From c4329f8d9cb09176b107624cda27b8cb35ad537c Mon Sep 17 00:00:00 2001 From: Josh Black Date: Fri, 4 Feb 2022 15:35:39 -0600 Subject: [PATCH] docs(storybook): update theme and switch theme icon (#10593) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- packages/carbon-react/.storybook/preview.js | 2 +- packages/carbon-react/.storybook/theme.js | 39 ++------------------- 2 files changed, 4 insertions(+), 37 deletions(-) diff --git a/packages/carbon-react/.storybook/preview.js b/packages/carbon-react/.storybook/preview.js index 2ddbd2fab609..25319807bd36 100644 --- a/packages/carbon-react/.storybook/preview.js +++ b/packages/carbon-react/.storybook/preview.js @@ -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'], }, }, diff --git a/packages/carbon-react/.storybook/theme.js b/packages/carbon-react/.storybook/theme.js index 90f89efc677b..1f08a492cc20 100644 --- a/packages/carbon-react/.storybook/theme.js +++ b/packages/carbon-react/.storybook/theme.js @@ -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',