From 40dffbf1eb2a480d2470dc70338118934f96cfa7 Mon Sep 17 00:00:00 2001 From: Gaby Zifferman Date: Fri, 13 Sep 2024 15:04:33 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20add=20mp=20colors=20to=20storybook=20an?= =?UTF-8?q?d=20remove=20token=20to=20css=20from=20pre=20com=E2=80=A6=20(#4?= =?UTF-8?q?05)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .husky/pre-commit | 1 - .storybook/manager.ts | 6 ++++++ .storybook/theme.ts | 16 ++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .storybook/manager.ts create mode 100644 .storybook/theme.ts diff --git a/.husky/pre-commit b/.husky/pre-commit index 532fa1f84..d0a778429 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,2 +1 @@ -npm run tokens-to-css npx lint-staged \ No newline at end of file diff --git a/.storybook/manager.ts b/.storybook/manager.ts new file mode 100644 index 000000000..3e931eb70 --- /dev/null +++ b/.storybook/manager.ts @@ -0,0 +1,6 @@ +import { addons } from '@storybook/manager-api' +import customTheme from './theme' + +addons.setConfig({ + theme: customTheme, +}) diff --git a/.storybook/theme.ts b/.storybook/theme.ts new file mode 100644 index 000000000..7c91f4ca7 --- /dev/null +++ b/.storybook/theme.ts @@ -0,0 +1,16 @@ +import { create } from '@storybook/theming' +import { LightTheme } from '../design/LightTheme' + +export default create({ + base: 'light', + colorPrimary: LightTheme.token.colorPrimary, + colorSecondary: LightTheme.token.colorPrimaryText, + appBg: LightTheme.token.colorPrimaryBgHover, + appContentBg: LightTheme.token.colorPrimaryBg, + textColor: LightTheme.token.colorText, + textInverseColor: LightTheme.token.colorTextQuaternary, + brandTitle: 'Aquarium', + brandImage: + 'https://raw.githubusercontent.com/mParticle/aquarium/3abc3b71916ab5a7db3c4f93e06ad2bd5845e1bf/src/assets/svg/mp-logo-wordmark.svg', + brandUrl: 'https://github.com/mParticle/aquarium/', +})