Skip to content

Commit c1e20c3

Browse files
committed
Fixing octicons stories
1 parent e7e243d commit c1e20c3

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.storybook/Octicon.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from 'react'
22
import {storiesOf} from '@storybook/react'
3-
43
import octicons from 'octicons'
54
import SVGInline from 'react-svg-inline'
65

@@ -13,14 +12,16 @@ const Octicon = (props) => {
1312
}
1413
}
1514

16-
const sizes = [64, 32, 16]
15+
const story = storiesOf('Octicons', module)
1716

18-
storiesOf('Octicons', module)
19-
.add('test', () => {
20-
const name = 'beaker'
17+
Object.keys(octicons).forEach(name => {
18+
story.add(name, () => {
2119
return (
22-
<div>{sizes.map((size, i) => (
23-
<Octicon name={name} width={size} height={size} key={i} />
24-
))}</div>
20+
<div>
21+
<Octicon name={name} height="64" />
22+
<Octicon name={name} height="32" />
23+
<Octicon name={name} height="16" />
24+
</div>
2525
)
2626
})
27+
})

0 commit comments

Comments
 (0)