From edb579f7935c73132f6d9e5c5a87bf4428c6f586 Mon Sep 17 00:00:00 2001 From: Th1nkK1D Date: Tue, 18 May 2021 17:10:35 +0700 Subject: [PATCH] Update storybook theme --- .storybook/manager.js | 12 ++++++------ .storybook/preview.js | 5 +++++ package.json | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.storybook/manager.js b/.storybook/manager.js index ddb975e..3d6353c 100644 --- a/.storybook/manager.js +++ b/.storybook/manager.js @@ -1,11 +1,11 @@ import { addons } from '@storybook/addons'; import { create } from '@storybook/theming'; -const theme = create({ - base: 'light', - brandTitle: 'ELECT Common', -}); - addons.setConfig({ - theme: theme, + theme: create({ + base: 'dark', + brandTitle: '@electinth/common', + brandImage: + 'https://elect.in.th/wp-content/themes/elect/dist/images/logo-white.png', + }), }); diff --git a/.storybook/preview.js b/.storybook/preview.js index 2af9773..5b7c569 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -1,3 +1,5 @@ +import { themes } from '@storybook/theming'; + export const parameters = { actions: { argTypesRegex: '^on[A-Z].*' }, options: { @@ -13,4 +15,7 @@ export const parameters = { date: /Date$/, }, }, + docs: { + theme: themes.dark, + }, }; diff --git a/package.json b/package.json index 38a3cc6..600c6cb 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "license": "MIT", "main": "components/index.js", "scripts": { - "storybook": "start-storybook -p 6006", + "storybook": "start-storybook -p 6006 --no-manager-cache", "build-storybook": "build-storybook", "create": "hygen component new", "lint": "eslint . --fix",