Skip to content

Commit

Permalink
add release and rewrite the app
Browse files Browse the repository at this point in the history
"
  • Loading branch information
wcastand committed Apr 3, 2017
1 parent aa1890c commit 3c09664
Show file tree
Hide file tree
Showing 7 changed files with 1,035 additions and 229 deletions.
8 changes: 0 additions & 8 deletions .circle.yml

This file was deleted.

21 changes: 11 additions & 10 deletions exemple/stories/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { PropTypes } from 'react';
import { storiesOf } from '@kadira/storybook';
import { setAddon, storiesOf } from '@kadira/storybook';
import { createComponent } from 'react-fela';

import initFelaProvider from './initFela';
import PropsProvider from '../../lib/index';
import PropsAddon from '../../lib/index';

const FelaProvider = initFelaProvider();

Expand All @@ -18,14 +18,15 @@ Test.propsTypes = {
color: PropTypes.string,
};

setAddon(PropsAddon);

storiesOf('test', module)
.addDecorator(FelaProvider)
.addDecorator(PropsProvider('Test'))
.add('Paris', () => (
<Test fontSize={45} fontFamily="Roboto" align="center" color="#CAF200">Hello</Test>
))
.add('Orleans', () => <Test color="#236544">Hello</Test>);
.addWithProps(
'Paris',
() => <Test fontSize={45} fontFamily="Roboto" align="center" color="#CAF200">Hello</Test>,
Test,
)
.addWithProps('Orleans', () => <Test color="#236544">Hello</Test>, Test);

storiesOf('test 2', module)
.addDecorator(PropsProvider('div'))
.add('Paris', () => <div color="#333">test</div>);
storiesOf('test 2', module).addWithProps('Paris', () => <div color="#333">test</div>);
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "storybook-addon-props-fela",
"name": "storybook-addon-props",
"version": "0.0.6",
"description": "Show props of a fela component in storybook",
"description": "Show props of a component in storybook",
"main": "lib/index.js",
"author": "wcastand",
"license": "MIT",
Expand All @@ -17,8 +17,9 @@
"test:all": "jest",
"test:dev": "jest --watch",
"prebuild": "rimraf lib",
"storybook": "start-storybook -p 6006 -c ./exemple/.storybook",
"storybook": "start-storybook -p 9009 -c ./exemple/.storybook",
"preversion": "npm run build",
"release": "npm run release",
"2npm": "publish"
},
"devDependencies": {
Expand All @@ -27,18 +28,20 @@
"babel-jest": "^19.0.0",
"babel-preset-env": "^1.2.2",
"babel-preset-react": "^6.23.0",
"fela": "4.3.2",
"jest": "^19.0.2",
"prettier": "^0.22.0",
"publish": "^0.6.0",
"react": "^15.4.2",
"react-addons-test-utils": "^15.4.2",
"react-dom": "^15.4.2",
"react-fela": "^4.3.2",
"react-test-renderer": "^15.4.2",
"regenerator-runtime": "^0.10.3",
"release": "^1.1.7",
"rimraf": "^2.6.1"
},
"dependencies": {
"fela": "4.3.2",
"lodash": "4.17.4"
}
}
}
157 changes: 92 additions & 65 deletions src/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,85 +1,112 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`listProps 1`] = `
<div
style={
Object {
"alignItems": "stretch",
"borderBottom": "1px solid rgba(175, 175, 175, .3)",
"display": "flex",
"flex": 1,
"flexDirection": "row",
"justifyContent": "flex-start",
}
}
>
<span
exports[`renderList 1`] = `
<div>
<div
style={
Object {
"alignItems": "flex-start",
"borderBottom": "1px solid rgba(175, 175, 175, .3)",
"display": "flex",
"flex": 1,
"padding": "12px 5px",
"flexDirection": "row",
"justifyContent": "flex-start",
}
}
>
children
</span>
<span
style={
Object {
"flex": 1,
"padding": "12px 5px",
<span
style={
Object {
"flex": 1,
"padding": "12px 5px",
}
}
}
/>
<span
style={
Object {
"flex": 1,
"padding": "12px 5px",
>
color
</span>
<span
style={
Object {
"flex": 1,
"padding": "12px 5px",
}
}
}
/>
</div>
`;

exports[`listProps 2`] = `
<div
style={
Object {
"alignItems": "stretch",
"borderBottom": "1px solid rgba(175, 175, 175, .3)",
"display": "flex",
"flex": 1,
"flexDirection": "row",
"justifyContent": "flex-start",
}
}
>
<span
>
#000
</span>
<span
style={
Object {
"flex": 1,
"padding": "12px 5px",
}
}
>
</span>
<span
style={
Object {
"flex": 1,
"padding": "12px 5px",
}
}
>
#333
</span>
</div>
<div
style={
Object {
"alignItems": "flex-start",
"borderBottom": "1px solid rgba(175, 175, 175, .3)",
"display": "flex",
"flex": 1,
"padding": "12px 5px",
"flexDirection": "row",
"justifyContent": "flex-start",
}
}
>
color
</span>
<span
style={
Object {
"flex": 1,
"padding": "12px 5px",
<span
style={
Object {
"flex": 1,
"padding": "12px 5px",
}
}
}
/>
<span
style={
Object {
"flex": 1,
"padding": "12px 5px",
>
children
</span>
<span
style={
Object {
"flex": 1,
"padding": "12px 5px",
}
}
}
/>
>
Hello
</span>
<span
style={
Object {
"flex": 1,
"padding": "12px 5px",
}
}
>
</span>
<span
style={
Object {
"flex": 1,
"padding": "12px 5px",
}
}
>
-
</span>
</div>
</div>
`;
Loading

0 comments on commit 3c09664

Please sign in to comment.