This repository has been archived by the owner on Nov 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
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 #12 from marc-rutkowski/develop
Support storybook 3.2.11
- Loading branch information
Showing
24 changed files
with
2,587 additions
and
2,133 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"presets": ["es2015", "react", "stage-0"], | ||
"plugins": [ "transform-flow-strip-types" ] | ||
"presets": ["env", "react", "stage-0"], | ||
"plugins": ["transform-flow-strip-types"] | ||
} |
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,12 @@ | ||
{ | ||
"presets": ["env", "react", "stage-0"], | ||
"plugins": [ | ||
[ | ||
"babel-plugin-react-docgen", | ||
{ | ||
"DOC_GEN_COLLECTION_NAME": "STORYBOOK_REACT_CLASSES", | ||
"resolver": "findAllExportedComponentDefinitions" | ||
} | ||
] | ||
] | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import '@storybook/addons'; | ||
import '../src/register'; | ||
import '@storybook/addons' | ||
import '../src/register' | ||
// in your project replace to: | ||
// import 'storybook-addon-props/register' | ||
|
||
import '@storybook/addon-actions/register'; | ||
import '@storybook/addon-actions/register' |
File renamed without changes.
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
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
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 |
---|---|---|
@@ -1,15 +1,16 @@ | ||
import React from 'react'; | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
|
||
const style = { | ||
fontSize: '2em', | ||
marginBottom: '0.25em', | ||
}; | ||
} | ||
|
||
/** Simple header */ | ||
const H1 = ({ children }) => <h1 style={style}>{children}</h1>; | ||
const H1 = ({ children }) => <h1 style={style}>{children}</h1> | ||
H1.propTypes = { | ||
/** Header content */ | ||
children: React.PropTypes.node.isRequired, | ||
}; | ||
children: PropTypes.node.isRequired, | ||
} | ||
|
||
export default H1; | ||
export default H1 |
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 |
---|---|---|
@@ -1,11 +1,14 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import React from 'react' | ||
import { storiesOf } from '@storybook/react' | ||
|
||
import H1 from './H1'; | ||
import H1 from './H1' | ||
|
||
storiesOf( | ||
'H1', | ||
module | ||
).addWithDoc('with label', H1, 'It should render a header with a label', () => | ||
<H1>Header text</H1> | ||
); | ||
).addWithDoc( | ||
'with label', | ||
H1, | ||
'The PROPS pane should display props extracted from functional component', | ||
() => <H1>Header text</H1> | ||
) |
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 |
---|---|---|
@@ -1,24 +1,25 @@ | ||
/* @flow */ | ||
import React from 'react'; | ||
// $FlowFixMe | ||
import { storiesOf } from '@storybook/react'; | ||
import { fromJS } from 'immutable'; | ||
import React from 'react' | ||
import { storiesOf } from '@storybook/react' | ||
import { fromJS } from 'immutable' | ||
|
||
import UserDetails from './UserDetails'; | ||
import type { User } from './UserDetails'; | ||
import UserDetails from './UserDetails' | ||
import type { User } from './UserDetails' | ||
|
||
const user: User = { | ||
id: 1, | ||
name: 'Joe', | ||
}; | ||
} | ||
|
||
const imm = fromJS({ | ||
test: 'abc', | ||
}); | ||
}) | ||
|
||
storiesOf( | ||
'UserDetails', | ||
module | ||
).addWithDoc('default', UserDetails, 'It should render given user info', () => | ||
<UserDetails user={user} num={42} imm={imm} /> | ||
); | ||
).addWithDoc( | ||
'default', | ||
UserDetails, | ||
'It should display props info extracted from [Flow](https://flow.org/) annotations', | ||
() => <UserDetails user={user} num={42} imm={imm} /> | ||
) |
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.