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

Commit a789119

Browse files
committedOct 27, 2019
feat(icon): added icon storybook
1 parent 844bcfb commit a789119

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed
 

‎.storybook/config.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
import { configure, addDecorator } from '@storybook/vue';
22
import ThemeProvider from '../src/components/ThemeProvider'
33
import theme from '../src/lib/theme'
4+
import icons from '../src/lib/plugin/iconsPaths'
45

56
addDecorator(() => ({
67
template: `
7-
<ThemeProvider :theme="theme" color-mode="light">
8+
<ThemeProvider :theme="theme" :icons="icons" color-mode="light">
89
<story/>
910
</ThemeProvider>
1011
`,
1112
data() {
1213
return {
13-
theme
14+
theme,
15+
icons
1416
}
1517
},
1618
components: { ThemeProvider }

‎stories/4-Icon.stories.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ storiesOf('UI | Icon', module)
88
components: { Icon },
99
template: `
1010
<div>
11-
<Icon name="star" color="blue.400" size="4" />
12-
<Icon name="email" color="yellow.400" size="5" />
13-
<Icon name="phone" color="green.400" size="6" />
11+
<Icon name="star" mx="2" color="yellow.400" size="4" />
12+
<Icon name="email" mx="2" color="indigo.400" size="5" />
13+
<Icon name="phone" mx="2" color="green.400" size="6" />
1414
</div>
1515
`
1616
}))
1717
.add('Custom Icon eg FA', () => ({
1818
components: { Icon },
1919
template: `
2020
<div>
21-
<Icon name="Search" color="blue.400" size="10" />
21+
<Icon name="ambulance" color="blue.400" size="10" />
2222
</div>
2323
`
2424
}))

0 commit comments

Comments
 (0)