Skip to content

Commit

Permalink
Theme Storybook (#87)
Browse files Browse the repository at this point in the history
* Use influx colors in storybook theme

* Use a logo image intead of a placeholder
  • Loading branch information
alexpaxton authored Apr 15, 2019
1 parent bba7377 commit 59f679a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
Binary file added .storybook/clockface-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions .storybook/clockfaceTheme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { create } from '@storybook/theming';

import logo from './clockface-logo.png'

export default create({
base: 'light',

colorPrimary: '#22ADF6',
colorSecondary: '#9394FF',

// UI
appBg: '#f6f6f8',
appContentBg: '#fafafc',
appBorderColor: '#eeeff2',
appBorderRadius: 4,

// Typography
fontBase: '"Roboto", sans-serif',
fontCode: '"RobotoMono", monospace',

// Text colors
textColor: '#545667',
textInverseColor: 'rgba(255,255,255,0.9)',

// Toolbar default and active colors
barTextColor: '#a4a8b6',
barSelectedColor: '#7A65F2',
barBg: '#ffffff',

// Form colors
inputBg: '#ffffff',
inputBorder: '#d4d7dd',
inputTextColor: '#31313d',
inputBorderRadius: 4,

brandTitle: 'Clockface',
brandUrl: 'https://influxdata.github.io/clockface',
brandImage: logo,
});
2 changes: 2 additions & 0 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {addDecorator, configure, addParameters} from '@storybook/react'
import clockfaceTheme from './clockfaceTheme'
import {withInfo} from '@storybook/addon-info'
import {darkTheme, TableComponent} from './StoryLayout'

Expand All @@ -13,6 +14,7 @@ addDecorator(

addParameters({
options: {
theme: clockfaceTheme,
panelPosition: 'right',
},
})
Expand Down

0 comments on commit 59f679a

Please # to comment.