Skip to content

Commit

Permalink
docs(storybook): update theme and switch theme icon (#10593)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
joshblack and kodiakhq[bot] authored Feb 4, 2022
1 parent db42d28 commit c4329f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 37 deletions.
2 changes: 1 addition & 1 deletion packages/carbon-react/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const globalTypes = {
description: 'Set the global theme for displaying components',
defaultValue: 'white',
toolbar: {
icon: 'circlehollow',
icon: 'paintbrush',
items: ['white', 'g10', 'g90', 'g100'],
},
},
Expand Down
39 changes: 3 additions & 36 deletions packages/carbon-react/.storybook/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,19 @@
*/

import { create } from '@storybook/theming';
import { g10 } from '@carbon/themes';
import PackageInfo from './../package.json';

const {
field01,
interactive01,
selectedUI,
text01,
inverse01,
ui01,
ui03,
uiBackground,
} = g10;

/**
* @see https://storybook.js.org/docs/react/configure/theming
*/
export default create({
base: 'light',

colorPrimary: interactive01,
colorSecondary: selectedUI,

// UI
appBg: uiBackground,
appContentBg: ui01,
appBorderColor: ui03,
appBorderRadius: 0,

// Typography
fontBase: "'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif",
fontCode:
"'IBM Plex Mono', Menlo, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Courier, monospace",

// Text colors
textColor: text01,
textInverseColor: inverse01,

// Toolbar default and active colors
barTextColor: text01,
barSelectedColor: interactive01,
barBg: uiBackground,

// Form colors
inputBg: field01,
inputBorder: ui03,
inputTextColor: text01,
inputBorderRadius: 0,

brandTitle: `@carbon/react@${PackageInfo.version}`,
brandUrl:
'https://github.com/carbon-design-system/carbon/tree/main/packages/carbon-react',
Expand Down

0 comments on commit c4329f8

Please sign in to comment.