Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
feat(icon): added icon storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
codebender828 committed Oct 27, 2019
1 parent 844bcfb commit a789119
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import { configure, addDecorator } from '@storybook/vue';
import ThemeProvider from '../src/components/ThemeProvider'
import theme from '../src/lib/theme'
import icons from '../src/lib/plugin/iconsPaths'

addDecorator(() => ({
template: `
<ThemeProvider :theme="theme" color-mode="light">
<ThemeProvider :theme="theme" :icons="icons" color-mode="light">
<story/>
</ThemeProvider>
`,
data() {
return {
theme
theme,
icons
}
},
components: { ThemeProvider }
Expand Down
8 changes: 4 additions & 4 deletions stories/4-Icon.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ storiesOf('UI | Icon', module)
components: { Icon },
template: `
<div>
<Icon name="star" color="blue.400" size="4" />
<Icon name="email" color="yellow.400" size="5" />
<Icon name="phone" color="green.400" size="6" />
<Icon name="star" mx="2" color="yellow.400" size="4" />
<Icon name="email" mx="2" color="indigo.400" size="5" />
<Icon name="phone" mx="2" color="green.400" size="6" />
</div>
`
}))
.add('Custom Icon eg FA', () => ({
components: { Icon },
template: `
<div>
<Icon name="Search" color="blue.400" size="10" />
<Icon name="ambulance" color="blue.400" size="10" />
</div>
`
}))

0 comments on commit a789119

Please # to comment.