Skip to content

Commit a44f8bf

Browse files
authored
Merge pull request #21 from streamich/feat/global-css
Feat/global css
2 parents 34f1385 + 45ff58f commit a44f8bf

50 files changed

Lines changed: 1133 additions & 59 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.storybook/animate.stories.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import {createElement as h} from 'react';
2+
import {storiesOf} from '@storybook/react';
3+
const {action} = require('@storybook/addon-actions');
4+
const {linkTo} = require('@storybook/addon-links');
5+
const {create} = require('../index');
6+
const {addon: addonRule} = require('../addon/rule');
7+
const {addon: addonKeyframes} = require('../addon/keyframes');
8+
9+
const animations = [
10+
'fadeIn',
11+
'fadeInDown',
12+
'fadeInExpand',
13+
];
14+
15+
const nano = create();
16+
addonRule(nano);
17+
addonKeyframes(nano);
18+
const {rule} = nano;
19+
20+
var className = rule({
21+
width: '200px',
22+
height: '200px',
23+
background: 'red',
24+
});
25+
26+
let stories = storiesOf('Addons/Animate', module);
27+
28+
animations.forEach(name => {
29+
stories = stories.add(name, () => {
30+
require('../addon/animate/' + name).addon(nano);
31+
return h('div', {className: name + className});
32+
});
33+
});

.storybook/global-css.stories.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import {createElement as h} from 'react';
2+
import {storiesOf} from '@storybook/react';
3+
const {action} = require('@storybook/addon-actions');
4+
const {linkTo} = require('@storybook/addon-links');
5+
const {create} = require('../index');
6+
const {addon: resetEricMeyerCondensed} = require('../addon/reset/EricMeyerCondensed');
7+
8+
const nano = create();
9+
resetEricMeyerCondensed(nano);
10+
11+
storiesOf('CSS resets', module)
12+
.add('Eric Meyer - condensed', () =>
13+
h('div', null, 'Hello world')
14+
)

.storybook/stylis.stories.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import {createElement as h} from 'react';
2+
import {storiesOf} from '@storybook/react';
3+
const {action} = require('@storybook/addon-actions');
4+
const {linkTo} = require('@storybook/addon-links');
5+
const {create} = require('../index');
6+
const {addon: addonStylis} = require('../addon/stylis');
7+
const {addon: addonRule} = require('../addon/rule');
8+
9+
const renderer = create({h});
10+
addonStylis(renderer);
11+
addonRule(renderer);
12+
const {rule} = renderer;
13+
14+
const className = rule(`
15+
color: red;
16+
&:hover {
17+
color: blue;
18+
}
19+
`);
20+
21+
storiesOf('Addons/stylis', module)
22+
.add('Default', () =>
23+
h('div', {className}, 'Hello world')
24+
)

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ node_js:
1111
- '8'
1212
script:
1313
- npm run test
14-
- npm run build
1514
matrix:
1615
allow_failures: []
1716
fast_finish: true

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@ __Tiny [5<sup>th</sup> generation](https://github.com/streamich/freestyler/blob/
3333
- [`nesting`](./docs/nesting.md)
3434
- [`keyframes()`](./docs/keyframes.md)
3535
- [`hydrate`](./docs/hydrate.md)
36+
- [`stylis`](./docs/stylis.md)
3637
- [`unitless`](./docs/unitless.md)
3738
- [`!important`](./docs/important.md)
3839
- [`:global`](./docs/global.md)
40+
- [Animations](./docs/animations.md)
41+
- [CSS resets](./docs/resets.md)
3942
- [Server-side rendering](./docs/SSR.md)
4043

4144

0 commit comments

Comments
 (0)