📝(react) customize storybook theme
We want to customize our Storybook to market it for Cunningham.
This commit is contained in:
committed by
Jean-Baptiste PENRATH
parent
5970da3052
commit
d767d61dd2
@@ -24,7 +24,7 @@ const config: StorybookConfig = {
|
|||||||
name: "@storybook/react-vite",
|
name: "@storybook/react-vite",
|
||||||
options: {},
|
options: {},
|
||||||
},
|
},
|
||||||
staticDirs: ["../src"],
|
staticDirs: ["../src", "../public"],
|
||||||
features: {
|
features: {
|
||||||
storyStoreV7: true,
|
storyStoreV7: true,
|
||||||
},
|
},
|
||||||
|
|||||||
41
packages/react/.storybook/manager.ts
Normal file
41
packages/react/.storybook/manager.ts
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
import { addons } from '@storybook/manager-api';
|
||||||
|
import { create } from '@storybook/theming';
|
||||||
|
import { defaultTokens } from '@openfun/cunningham-tokens';
|
||||||
|
|
||||||
|
const COLORS = defaultTokens.theme.colors;
|
||||||
|
|
||||||
|
const theme = create({
|
||||||
|
base: 'light',
|
||||||
|
brandUrl: 'https://github.com/openfun/cunningham',
|
||||||
|
brandImage: '/logo-cunningham.svg',
|
||||||
|
brandTitle: 'Cunningham',
|
||||||
|
brandTarget: '_self',
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
colorPrimary: COLORS["primary-400"],
|
||||||
|
colorSecondary: COLORS["primary-400"],
|
||||||
|
|
||||||
|
// UI
|
||||||
|
appBg: COLORS["greyscale-100"],
|
||||||
|
appContentBg: COLORS["greyscale-000"],
|
||||||
|
appBorderColor: COLORS["greyscale-300"],
|
||||||
|
appBorderRadius: 4,
|
||||||
|
|
||||||
|
// Text colors
|
||||||
|
textColor: COLORS["greyscale-900"],
|
||||||
|
textInverseColor: COLORS["greyscale-000"],
|
||||||
|
|
||||||
|
// Toolbar default and active colors
|
||||||
|
barTextColor: COLORS["greyscale-500"],
|
||||||
|
barSelectedColor: COLORS["greyscale-900"],
|
||||||
|
barBg: COLORS["greyscale-000"],
|
||||||
|
|
||||||
|
// Form colors
|
||||||
|
inputBg: COLORS["greyscale-000"],
|
||||||
|
inputBorder: COLORS["greyscale-300"],
|
||||||
|
inputTextColor: COLORS["greyscale-800"],
|
||||||
|
inputBorderRadius: 2,
|
||||||
|
});
|
||||||
|
|
||||||
|
addons.setConfig({ theme });
|
||||||
28
packages/react/public/logo-cunningham.svg
Normal file
28
packages/react/public/logo-cunningham.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 15 KiB |
Reference in New Issue
Block a user