forked from nostalgic-css/NES.css
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(storybook): storybook enhancement and cleanup
refactored the storybook codebase for all components re nostalgic-css#381
- Loading branch information
Showing
49 changed files
with
643 additions
and
404 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
export const Icons = { | ||
twitter: 'twitter', | ||
facebook: 'facebook', | ||
github: 'github', | ||
google: 'google', | ||
youtube: 'youtube', | ||
whatsapp: 'whatsapp', | ||
gmail: 'gmail', | ||
linkedin: 'linkedin', | ||
instagram: 'instagram', | ||
close: 'close', | ||
coin: 'coin', | ||
trophy: 'trophy', | ||
}; | ||
|
||
export const Sprites = { | ||
'nes-pokeball': 'nes-pokeball', | ||
'nes-bulbasaur': 'nes-bulbasaur', | ||
'nes-charmander': 'nes-charmander', | ||
'nes-squirtle': 'nes-squirtle', | ||
'nes-smartphone': 'nes-smartphone', | ||
'nes-kirby': 'nes-kirby', | ||
'nes-phone': 'nes-phone', | ||
'nes-octocat animate': 'nes-octocat animate', | ||
'nes-ash': 'nes-ash', | ||
'nes-mario': 'nes-mario', | ||
'nes-logo': 'nes-logo', | ||
'nes-jp-logo': 'nes-jp-logo', | ||
'snes-logo': 'snes-logo', | ||
'snes-jp-logo': 'snes-jp-logo', | ||
}; | ||
|
||
export const Size = { | ||
default: '', | ||
'is-small': 'is-small', | ||
'is-medium': 'is-medium', | ||
'is-large': 'is-large', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default { | ||
'is-success': 'is-success', | ||
'is-warning': 'is-warning', | ||
'is-error': 'is-error', | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { storiesOf } from '@storybook/html'; | ||
import { withKnobs } from '@storybook/addon-knobs'; | ||
|
||
import Avatars from './avatars.template'; | ||
|
||
storiesOf('Avatars', module) | ||
.addDecorator(withKnobs) | ||
.add('Avatar', () => Avatars()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { select, boolean } from '@storybook/addon-knobs'; | ||
import classNames from 'classnames'; | ||
|
||
export default () => { | ||
const isRounded = boolean('is-rounded', false); | ||
const avatarSize = select('Avatar Classes', { | ||
default: '', | ||
'is-small': 'is-small', | ||
'is-medium': 'is-medium', | ||
'is-large': 'is-large', | ||
}, ''); | ||
|
||
const avatarClasses = classNames( | ||
'nes-avatar', | ||
avatarSize, | ||
{ | ||
'is-rounded': isRounded, | ||
}, | ||
); | ||
|
||
return ` | ||
<img src="http://www.gravatar.com/avatar?s=15" class="${avatarClasses}" | ||
alt="Gravatar Image Example" | ||
style="image-rendering: pixelated;"> | ||
`; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { storiesOf } from '@storybook/html'; | ||
import { withKnobs } from '@storybook/addon-knobs'; | ||
|
||
import Badge from './badge.template'; | ||
|
||
storiesOf('Badges', module) | ||
.addDecorator(withKnobs) | ||
.add('Badge', () => Badge()); |
Oops, something went wrong.