-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
162 additions
and
107 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
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,3 +1,10 @@ | ||
export { storiesOf, setAddon, addDecorator, addOptions, configure, getStorybook } from './preview'; | ||
export { | ||
storiesOf, | ||
setAddon, | ||
addDecorator, | ||
addParameters, | ||
configure, | ||
getStorybook, | ||
} from './preview'; | ||
|
||
export { moduleMetadata } from './preview/angular/decorators'; |
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 +1,8 @@ | ||
export { storiesOf, setAddon, addDecorator, addOptions, configure, getStorybook } from './preview'; | ||
export { | ||
storiesOf, | ||
setAddon, | ||
addDecorator, | ||
addParameters, | ||
configure, | ||
getStorybook, | ||
} from './preview'; |
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
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 +1,8 @@ | ||
export { storiesOf, setAddon, addDecorator, addOptions, configure, getStorybook } from './preview'; | ||
export { | ||
storiesOf, | ||
setAddon, | ||
addDecorator, | ||
addParameters, | ||
configure, | ||
getStorybook, | ||
} from './preview'; |
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
23 changes: 23 additions & 0 deletions
23
examples/angular-cli/src/stories/__snapshots__/core.stories.storyshot
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,23 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Storyshots Core|Parameters passed to story 1`] = ` | ||
<storybook-dynamic-app-root | ||
cfr={[Function CodegenComponentFactoryResolver]} | ||
data={[Function Object]} | ||
target={[Function ViewContainerRef_]} | ||
> | ||
<storybook-button-component | ||
_nghost-c8="" | ||
> | ||
|
||
|
||
<button | ||
_ngcontent-c8="" | ||
> | ||
Parameters are {"globalParameter":"globalParameter","chapterParameter":"chapterParameter","storyParameter":"storyParameter","fileName":"/Users/tom/OSS/storybook/examples/angular-cli/src/stories/core.stories.ts"} | ||
</button> | ||
|
||
|
||
</storybook-button-component> | ||
</storybook-dynamic-app-root> | ||
`; |
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,22 +1,22 @@ | ||
import { storiesOf, addOptions } from '@storybook/angular'; | ||
import { storiesOf, addParameters } from '@storybook/angular'; | ||
import { Button } from '@storybook/angular/demo'; | ||
|
||
const globalOption = 'globalOption'; | ||
const chapterOption = 'chapterOption'; | ||
const storyOption = 'storyOption'; | ||
const globalParameter = 'globalParameter'; | ||
const chapterParameter = 'chapterParameter'; | ||
const storyParameter = 'storyParameter'; | ||
|
||
addOptions({ globalOption }); | ||
addParameters({ globalParameter }); | ||
|
||
storiesOf('Core|Options', module) | ||
.addOptions({ chapterOption }) | ||
storiesOf('Core|Parameters', module) | ||
.addParameters({ chapterParameter }) | ||
.add( | ||
'passed to story', | ||
({ options }) => ({ | ||
({ parameters }) => ({ | ||
component: Button, | ||
props: { | ||
text: JSON.stringify(options), | ||
text: `Parameters are ${JSON.stringify(parameters)}`, | ||
onClick: () => 0, | ||
}, | ||
}), | ||
{ storyOption } | ||
{ storyParameter } | ||
); |
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
12 changes: 2 additions & 10 deletions
12
examples/official-storybook/stories/__snapshots__/core.stories.storyshot
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,7 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Storyshots core/options passed to story 1`] = ` | ||
exports[`Storyshots Core|Parameters passed to story 1`] = ` | ||
<div> | ||
Value of | ||
<code> | ||
myOption | ||
</code> | ||
is ' | ||
<code> | ||
value | ||
</code> | ||
' | ||
Parameters are {"globalParameter":"globalParameter","chapterParameter":"chapterParameter","storyParameter":"storyParameter","fileName":"/Users/tom/OSS/storybook/examples/official-storybook/stories/core.stories.js"} | ||
</div> | ||
`; |
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,14 +1,18 @@ | ||
import React from 'react'; | ||
import { storiesOf, addOptions } from '@storybook/react'; | ||
import { storiesOf, addParameters } from '@storybook/react'; | ||
|
||
const globalOption = 'globalOption'; | ||
const chapterOption = 'chapterOption'; | ||
const storyOption = 'storyOption'; | ||
const globalParameter = 'globalParameter'; | ||
const chapterParameter = 'chapterParameter'; | ||
const storyParameter = 'storyParameter'; | ||
|
||
addOptions({ globalOption }); | ||
addParameters({ globalParameter }); | ||
|
||
storiesOf('Core|Options', module) | ||
.addOptions({ chapterOption }) | ||
.add('passed to story', ({ options }) => <div>Options are {JSON.stringify(options)}</div>, { | ||
storyOption, | ||
}); | ||
storiesOf('Core|Parameters', module) | ||
.addParameters({ chapterParameter }) | ||
.add( | ||
'passed to story', | ||
({ parameters }) => <div>Parameters are {JSON.stringify(parameters)}</div>, | ||
{ | ||
storyParameter, | ||
} | ||
); |
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,13 +1,17 @@ | ||
import { storiesOf, addOptions } from '@storybook/polymer'; | ||
import { storiesOf, addParameters } from '@storybook/polymer'; | ||
|
||
const globalOption = 'globalOption'; | ||
const chapterOption = 'chapterOption'; | ||
const storyOption = 'storyOption'; | ||
const globalParameter = 'globalParameter'; | ||
const chapterParameter = 'chapterParameter'; | ||
const storyParameter = 'storyParameter'; | ||
|
||
addOptions({ globalOption }); | ||
addParameters({ globalParameter }); | ||
|
||
storiesOf('Core|Options', module) | ||
.addOptions({ chapterOption }) | ||
.add('passed to story', ({ options }) => `<div>${JSON.stringify(options)}</div>`, { | ||
storyOption, | ||
}); | ||
storiesOf('Core|Parameters', module) | ||
.addParameters({ chapterParameter }) | ||
.add( | ||
'passed to story', | ||
({ parameters }) => `<div>Parameters are ${JSON.stringify(parameters)}</div>`, | ||
{ | ||
storyParameter, | ||
} | ||
); |
7 changes: 7 additions & 0 deletions
7
examples/vue-kitchen-sink/src/stories/__snapshots__/core.stories.storyshot
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,7 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Storyshots Core|Parameters passed to story 1`] = ` | ||
<div> | ||
Parameters are {"globalParameter":"globalParameter","chapterParameter":"chapterParameter","storyParameter":"storyParameter","fileName":"/Users/tom/OSS/storybook/examples/vue-kitchen-sink/src/stories/core.stories.js"} | ||
</div> | ||
`; |
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,19 +1,19 @@ | ||
import { storiesOf, addOptions } from '@storybook/vue'; | ||
import { storiesOf, addParameters } from '@storybook/vue'; | ||
|
||
const globalOption = 'globalOption'; | ||
const chapterOption = 'chapterOption'; | ||
const storyOption = 'storyOption'; | ||
const globalParameter = 'globalParameter'; | ||
const chapterParameter = 'chapterParameter'; | ||
const storyParameter = 'storyParameter'; | ||
|
||
addOptions({ globalOption }); | ||
addParameters({ globalParameter }); | ||
|
||
storiesOf('Core|Options', module) | ||
.addOptions({ chapterOption }) | ||
storiesOf('Core|Parameters', module) | ||
.addParameters({ chapterParameter }) | ||
.add( | ||
'passed to story', | ||
({ options }) => ({ | ||
template: `<div>${JSON.stringify(options)}</div>`, | ||
({ parameters }) => ({ | ||
template: `<div>Parameters are ${JSON.stringify(parameters)}</div>`, | ||
}), | ||
{ | ||
storyOption, | ||
storyParameter, | ||
} | ||
); |
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.