-
-
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 #2918 from storybooks/better-examples-separation
Better examples separation
- Loading branch information
Showing
58 changed files
with
1,066 additions
and
958 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,15 +1,20 @@ | ||
import { configure } from '@storybook/angular'; | ||
import { setOptions } from '@storybook/addon-options'; | ||
import addCssWarning from '../src/cssWarning'; | ||
|
||
addCssWarning(); | ||
|
||
setOptions({ | ||
hierarchyRootSeparator: /\|/, | ||
}); | ||
|
||
function loadStories() { | ||
// put welcome screen at the top of the list so it's the first one displayed | ||
require('../src/stories'); | ||
|
||
// automatically import all story ts files that end with *.stories.ts | ||
const req = require.context('../src/stories', true, /\.stories\.ts$/) | ||
req.keys().forEach((filename) => req(filename)) | ||
const req = require.context('../src/stories', true, /\.stories\.ts$/); | ||
req.keys().forEach((filename) => req(filename)); | ||
} | ||
|
||
configure(loadStories, module); |
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
6 changes: 3 additions & 3 deletions
6
examples/angular-cli/src/stories/__snapshots__/addon-links.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
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
21 changes: 21 additions & 0 deletions
21
examples/angular-cli/src/stories/__snapshots__/custom-ng-content.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,21 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Storyshots Custom|ng-content Default 1`] = ` | ||
<storybook-dynamic-app-root | ||
cfr={[Function CodegenComponentFactoryResolver]} | ||
data={[Function Object]} | ||
target={[Function ViewContainerRef_]} | ||
> | ||
<ng-component> | ||
<storybook-with-ng-content> | ||
<div | ||
style="color: #1e88e5;" | ||
> | ||
<h1> | ||
This is rendered in ng-content | ||
</h1> | ||
</div> | ||
</storybook-with-ng-content> | ||
</ng-component> | ||
</storybook-dynamic-app-root> | ||
`; |
29 changes: 29 additions & 0 deletions
29
examples/angular-cli/src/stories/__snapshots__/custom-pipes.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,29 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Storyshots Custom|Pipes Simple 1`] = ` | ||
<storybook-dynamic-app-root | ||
cfr={[Function CodegenComponentFactoryResolver]} | ||
data={[Function Object]} | ||
target={[Function ViewContainerRef_]} | ||
> | ||
<storybook-name> | ||
<h1> | ||
CustomPipe: foobar | ||
</h1> | ||
</storybook-name> | ||
</storybook-dynamic-app-root> | ||
`; | ||
|
||
exports[`Storyshots Custom|Pipes With Knobs 1`] = ` | ||
<storybook-dynamic-app-root | ||
cfr={[Function CodegenComponentFactoryResolver]} | ||
data={[Function Object]} | ||
target={[Function ViewContainerRef_]} | ||
> | ||
<storybook-name> | ||
<h1> | ||
CustomPipe: foobar | ||
</h1> | ||
</storybook-name> | ||
</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
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.