-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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 #20688 from storybookjs/shilman/20421-split-docs-s…
…torysource Source-loader: Fix export default variable references
- Loading branch information
Showing
4 changed files
with
69 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from "react"; | ||
import { action } from "@storybook/addon-actions"; | ||
import { Button } from "@storybook/react/demo"; | ||
|
||
const meta = { | ||
title: "Button", | ||
excludeStories: ["text"], | ||
includeStories: /emoji.*/ | ||
}; | ||
|
||
export default meta; | ||
|
||
export const text = () => ( | ||
<Button onClick={action("clicked")}>Hello Button</Button> | ||
); |
20 changes: 20 additions & 0 deletions
20
...c/abstract-syntax-tree/__snapshots__/inject-decorator.csf-meta-var.test.js.posix.snapshot
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,20 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`inject-decorator positive - ts - csf includes storySource parameter in the default exported variable 1`] = ` | ||
"import React from \\"react\\"; | ||
import { action } from \\"@storybook/addon-actions\\"; | ||
import { Button } from \\"@storybook/react/demo\\"; | ||
|
||
const meta = {parameters: {\\"storySource\\":{\\"source\\":\\"import React from \\\\\\"react\\\\\\";\\\\nimport { action } from \\\\\\"@storybook/addon-actions\\\\\\";\\\\nimport { Button } from \\\\\\"@storybook/react/demo\\\\\\";\\\\n\\\\nconst meta = {\\\\n title: \\\\\\"Button\\\\\\",\\\\n excludeStories: [\\\\\\"text\\\\\\"],\\\\n includeStories: /emoji.*/\\\\n};\\\\n\\\\nexport default meta;\\\\n\\\\nexport const text = () => (\\\\n <Button onClick={action(\\\\\\"clicked\\\\\\")}>Hello Button</Button>\\\\n);\\\\n\\",\\"locationsMap\\":{\\"text\\":{\\"startLoc\\":{\\"col\\":20,\\"line\\":13},\\"endLoc\\":{\\"col\\":1,\\"line\\":15},\\"startBody\\":{\\"col\\":20,\\"line\\":13},\\"endBody\\":{\\"col\\":1,\\"line\\":15}}}},}, | ||
title: \\"Button\\", | ||
excludeStories: [\\"text\\"], | ||
includeStories: /emoji.*/ | ||
}; | ||
|
||
export default meta; | ||
|
||
export const text = () => ( | ||
<Button onClick={action(\\"clicked\\")}>Hello Button</Button> | ||
); | ||
" | ||
`; |
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