-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from streamich/feat/global-css
Feat/global css
- Loading branch information
Showing
50 changed files
with
1,133 additions
and
59 deletions.
There are no files selected for viewing
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,33 @@ | ||
import {createElement as h} from 'react'; | ||
import {storiesOf} from '@storybook/react'; | ||
const {action} = require('@storybook/addon-actions'); | ||
const {linkTo} = require('@storybook/addon-links'); | ||
const {create} = require('../index'); | ||
const {addon: addonRule} = require('../addon/rule'); | ||
const {addon: addonKeyframes} = require('../addon/keyframes'); | ||
|
||
const animations = [ | ||
'fadeIn', | ||
'fadeInDown', | ||
'fadeInExpand', | ||
]; | ||
|
||
const nano = create(); | ||
addonRule(nano); | ||
addonKeyframes(nano); | ||
const {rule} = nano; | ||
|
||
var className = rule({ | ||
width: '200px', | ||
height: '200px', | ||
background: 'red', | ||
}); | ||
|
||
let stories = storiesOf('Addons/Animate', module); | ||
|
||
animations.forEach(name => { | ||
stories = stories.add(name, () => { | ||
require('../addon/animate/' + name).addon(nano); | ||
return h('div', {className: name + className}); | ||
}); | ||
}); |
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,14 @@ | ||
import {createElement as h} from 'react'; | ||
import {storiesOf} from '@storybook/react'; | ||
const {action} = require('@storybook/addon-actions'); | ||
const {linkTo} = require('@storybook/addon-links'); | ||
const {create} = require('../index'); | ||
const {addon: resetEricMeyerCondensed} = require('../addon/reset/EricMeyerCondensed'); | ||
|
||
const nano = create(); | ||
resetEricMeyerCondensed(nano); | ||
|
||
storiesOf('CSS resets', module) | ||
.add('Eric Meyer - condensed', () => | ||
h('div', null, 'Hello world') | ||
) |
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,24 @@ | ||
import {createElement as h} from 'react'; | ||
import {storiesOf} from '@storybook/react'; | ||
const {action} = require('@storybook/addon-actions'); | ||
const {linkTo} = require('@storybook/addon-links'); | ||
const {create} = require('../index'); | ||
const {addon: addonStylis} = require('../addon/stylis'); | ||
const {addon: addonRule} = require('../addon/rule'); | ||
|
||
const renderer = create({h}); | ||
addonStylis(renderer); | ||
addonRule(renderer); | ||
const {rule} = renderer; | ||
|
||
const className = rule(` | ||
color: red; | ||
&:hover { | ||
color: blue; | ||
} | ||
`); | ||
|
||
storiesOf('Addons/stylis', module) | ||
.add('Default', () => | ||
h('div', {className}, 'Hello world') | ||
) |
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 |
---|---|---|
|
@@ -11,7 +11,6 @@ node_js: | |
- '8' | ||
script: | ||
- npm run test | ||
- npm run build | ||
matrix: | ||
allow_failures: [] | ||
fast_finish: true | ||
|
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
Oops, something went wrong.