Skip to content

Commit

Permalink
Remove references to filesystem paths from stories
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeasday committed Mar 6, 2018
1 parent cc0b67f commit f654b4b
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports[`Storyshots Core|Parameters passed to story 1`] = `
<button
_ngcontent-c8=""
>
Parameters are {"globalParameter":"globalParameter","chapterParameter":"chapterParameter","storyParameter":"storyParameter","fileName":"/Users/tom/OSS/storybook/examples/angular-cli/src/stories/core.stories.ts"}
Parameters are {"globalParameter":"globalParameter","chapterParameter":"chapterParameter","storyParameter":"storyParameter"}
</button>


Expand Down
2 changes: 1 addition & 1 deletion examples/angular-cli/src/stories/core.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ storiesOf('Core|Parameters', module)
.addParameters({ chapterParameter })
.add(
'passed to story',
({ parameters }) => ({
({ parameters: { fileName, ...parameters } }) => ({
component: Button,
props: {
text: `Parameters are ${JSON.stringify(parameters)}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

exports[`Storyshots Core|Parameters passed to story 1`] = `
<div>
Parameters are {"globalParameter":"globalParameter","chapterParameter":"chapterParameter","storyParameter":"storyParameter","fileName":"/Users/tom/OSS/storybook/examples/official-storybook/stories/core.stories.js"}
Parameters are {"globalParameter":"globalParameter","chapterParameter":"chapterParameter","storyParameter":"storyParameter"}
</div>
`;
4 changes: 3 additions & 1 deletion examples/official-storybook/stories/core.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ storiesOf('Core|Parameters', module)
.addParameters({ chapterParameter })
.add(
'passed to story',
({ parameters }) => <div>Parameters are {JSON.stringify(parameters)}</div>,
({ parameters: { fileName, ...parameters } }) => (
<div>Parameters are {JSON.stringify(parameters)}</div>
),
{
storyParameter,
}
Expand Down
3 changes: 2 additions & 1 deletion examples/polymer-cli/src/stories/core.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ storiesOf('Core|Parameters', module)
.addParameters({ chapterParameter })
.add(
'passed to story',
({ parameters }) => `<div>Parameters are ${JSON.stringify(parameters)}</div>`,
({ parameters: { fileName, ...parameters } }) =>
`<div>Parameters are ${JSON.stringify(parameters)}</div>`,
{
storyParameter,
}
Expand Down
2 changes: 1 addition & 1 deletion examples/vue-kitchen-sink/.babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"presets": [
["env", { "modules": false }],
"stage-0",
"vue"
],
"env": {
Expand All @@ -9,4 +10,3 @@
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

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"}
Parameters are {"globalParameter":"globalParameter","chapterParameter":"chapterParameter","storyParameter":"storyParameter"}
</div>
`;
2 changes: 1 addition & 1 deletion examples/vue-kitchen-sink/src/stories/core.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ storiesOf('Core|Parameters', module)
.addParameters({ chapterParameter })
.add(
'passed to story',
({ parameters }) => ({
({ parameters: { fileName, ...parameters } }) => ({
template: `<div>Parameters are ${JSON.stringify(parameters)}</div>`,
}),
{
Expand Down

0 comments on commit f654b4b

Please sign in to comment.