Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular-cli: Add addon-docs example #7257

Merged
merged 4 commits into from
Jul 5, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Angular-cli: update storyshots
shilman committed Jul 2, 2019
commit e3c59fd7b9e4b53a68acd3bb703b52560ee3ad1e
Original file line number Diff line number Diff line change
@@ -7,10 +7,10 @@ exports[`Storyshots Addon|Actions Action and method 1`] = `
target={[Function ViewContainerRef_]}
>
<storybook-button-component
_nghost-a-c4=""
_nghost-a-c1=""
>
<button
_ngcontent-a-c4=""
_ngcontent-a-c1=""
>
Action and Method
</button>
@@ -25,10 +25,10 @@ exports[`Storyshots Addon|Actions Action only 1`] = `
target={[Function ViewContainerRef_]}
>
<storybook-button-component
_nghost-a-c3=""
_nghost-a-c0=""
>
<button
_ngcontent-a-c3=""
_ngcontent-a-c0=""
>
Action only
</button>
Original file line number Diff line number Diff line change
@@ -72,11 +72,11 @@ exports[`Storyshots Addon|Background background template 1`] = `
>
<ng-component>
<storybook-button-component
_nghost-a-c5=""
_nghost-a-c2=""
ng-reflect-text="Hello Button"
>
<button
_ngcontent-a-c5=""
_ngcontent-a-c2=""
>
Hello Button
</button>
Original file line number Diff line number Diff line change
@@ -92,11 +92,11 @@ exports[`Storyshots Addon|Centered centered template 1`] = `
style="margin: auto; max-height: 100%;"
>
<storybook-button-component
_nghost-a-c6=""
_nghost-a-c3=""
ng-reflect-text="Hello Button"
>
<button
_ngcontent-a-c6=""
_ngcontent-a-c3=""
>
Hello Button
</button>
Original file line number Diff line number Diff line change
@@ -7,10 +7,10 @@ exports[`Storyshots Addon|Links button with link to another story 1`] = `
target={[Function ViewContainerRef_]}
>
<storybook-button-component
_nghost-a-c7=""
_nghost-a-c4=""
>
<button
_ngcontent-a-c7=""
_ngcontent-a-c4=""
>
Go to Welcome Story
</button>
Original file line number Diff line number Diff line change
@@ -7,10 +7,10 @@ exports[`Storyshots Addon|Notes Note with HTML 1`] = `
target={[Function ViewContainerRef_]}
>
<storybook-button-component
_nghost-a-c9=""
_nghost-a-c6=""
>
<button
_ngcontent-a-c9=""
_ngcontent-a-c6=""
>
Notes with HTML
</button>
@@ -25,10 +25,10 @@ exports[`Storyshots Addon|Notes Simple note 1`] = `
target={[Function ViewContainerRef_]}
>
<storybook-button-component
_nghost-a-c8=""
_nghost-a-c5=""
>
<button
_ngcontent-a-c8=""
_ngcontent-a-c5=""
>
Notes on some Button
</button>
Original file line number Diff line number Diff line change
@@ -7,12 +7,12 @@ exports[`Storyshots Core|Parameters passed to story 1`] = `
target={[Function ViewContainerRef_]}
>
<storybook-button-component
_nghost-a-c10=""
_nghost-a-c7=""
>
<button
_ngcontent-a-c10=""
_ngcontent-a-c7=""
>
Parameters are {"options":{"hierarchyRootSeparator":{},"hierarchySeparator":{}},"globalParameter":"globalParameter","framework":"angular","chapterParameter":"chapterParameter","storyParameter":"storyParameter"}
Parameters are {"options":{"hierarchyRootSeparator":{},"hierarchySeparator":{},"docs":{"iframeHeight":"60px"}},"globalParameter":"globalParameter","framework":"angular","chapterParameter":"chapterParameter","storyParameter":"storyParameter"}
</button>
</storybook-button-component>
</storybook-dynamic-app-root>
Original file line number Diff line number Diff line change
@@ -8,11 +8,11 @@ exports[`Storyshots Custom|Style Default 1`] = `
>
<ng-component>
<storybook-button-component
_nghost-a-c11=""
_nghost-a-c8=""
ng-reflect-text="Button with custom styles"
>
<button
_ngcontent-a-c11=""
_ngcontent-a-c8=""
>
Button with custom styles
</button>
@@ -29,11 +29,11 @@ exports[`Storyshots Custom|Style With Knobs 1`] = `
>
<ng-component>
<storybook-button-component
_nghost-a-c12=""
_nghost-a-c9=""
ng-reflect-text="Button with custom styles"
>
<button
_ngcontent-a-c12=""
_ngcontent-a-c9=""
>
Button with custom styles
</button>
Original file line number Diff line number Diff line change
@@ -8,11 +8,11 @@ exports[`Storyshots Button with some emoji 1`] = `
>
<ng-component>
<storybook-button-component
_nghost-a-c2=""
_nghost-a-c12=""
ng-reflect-text="😀 😎 👍 💯"
>
<button
_ngcontent-a-c2=""
_ngcontent-a-c12=""
>
😀 😎 👍 💯
</button>
@@ -29,11 +29,11 @@ exports[`Storyshots Button with text 1`] = `
>
<ng-component>
<storybook-button-component
_nghost-a-c1=""
_nghost-a-c11=""
ng-reflect-text="Hello Button"
>
<button
_ngcontent-a-c1=""
_ngcontent-a-c11=""
>
Hello Button
</button>
@@ -50,98 +50,98 @@ exports[`Storyshots Welcome to Storybook 1`] = `
>
<ng-component>
<storybook-welcome-component
_nghost-a-c0=""
_nghost-a-c10=""
>
<main
_ngcontent-a-c0=""
_ngcontent-a-c10=""
>
<h1
_ngcontent-a-c0=""
_ngcontent-a-c10=""
>
Welcome to storybook
</h1>
<p
_ngcontent-a-c0=""
_ngcontent-a-c10=""
>
This is a UI component dev environment for your app.
</p>
<p
_ngcontent-a-c0=""
_ngcontent-a-c10=""
>
We've added some basic stories inside the
<span
_ngcontent-a-c0=""
_ngcontent-a-c10=""
class="inline-code"
>
src/stories
</span>
directory.
<br
_ngcontent-a-c0=""
_ngcontent-a-c10=""
/>
A story is a single state of one or more UI components. You can have as many stories as you want.
<br
_ngcontent-a-c0=""
_ngcontent-a-c10=""
/>
(Basically a story is like a visual test case.)
</p>
<p
_ngcontent-a-c0=""
_ngcontent-a-c10=""
>
See these sample
<a
_ngcontent-a-c0=""
_ngcontent-a-c10=""
role="button"
tabindex="0"
>
stories
</a>
for a component called
<span
_ngcontent-a-c0=""
_ngcontent-a-c10=""
class="inline-code"
>
Button
</span>
.
</p>
<p
_ngcontent-a-c0=""
_ngcontent-a-c10=""
>
Just like that, you can add your own components as stories.
<br
_ngcontent-a-c0=""
_ngcontent-a-c10=""
/>
You can also edit those components and see changes right away.
<br
_ngcontent-a-c0=""
_ngcontent-a-c10=""
/>
(Try editing the
<span
_ngcontent-a-c0=""
_ngcontent-a-c10=""
class="inline-code"
>
Button
</span>
stories located at
<span
_ngcontent-a-c0=""
_ngcontent-a-c10=""
class="inline-code"
>
src/stories/index.js
</span>
.)
</p>
<p
_ngcontent-a-c0=""
_ngcontent-a-c10=""
>
Usually we create stories with smaller UI components in the app.
<br
_ngcontent-a-c0=""
_ngcontent-a-c10=""
/>
Have a look at the
<a
_ngcontent-a-c0=""
_ngcontent-a-c10=""
href="https://storybook.js.org/basics/writing-stories"
rel="noopener noreferrer"
target="_blank"
@@ -151,20 +151,20 @@ exports[`Storyshots Welcome to Storybook 1`] = `
section in our documentation.
</p>
<p
_ngcontent-a-c0=""
_ngcontent-a-c10=""
class="note"
>
<b
_ngcontent-a-c0=""
_ngcontent-a-c10=""
>
NOTE:
</b>
<br
_ngcontent-a-c0=""
_ngcontent-a-c10=""
/>
Have a look at the
<span
_ngcontent-a-c0=""
_ngcontent-a-c10=""
class="inline-code"
>
.storybook/webpack.config.js