mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-19 05:02:40 +08:00
Merge pull request #10713 from storybookjs/generator_ember
cli: ember stories homogenization
This commit is contained in:
commit
1bc5a0c81b
@ -8,7 +8,7 @@ export default {
|
||||
export const ToStorybook = () => ({
|
||||
template: hbs`
|
||||
<div>
|
||||
<h3> Welcome to Storybook! </h3>
|
||||
<h3> Welcome to storybook </h3>
|
||||
<button {{action onClick}}> Checkout the button example </button>
|
||||
</div>
|
||||
`,
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { linkTo } from '@storybook/addon-links';
|
||||
|
||||
export default {
|
||||
title: 'Button',
|
||||
@ -24,3 +25,40 @@ export const Emoji = () => ({
|
||||
onClick: action('clicked'),
|
||||
},
|
||||
});
|
||||
|
||||
Emoji.story = {
|
||||
parameters: { notes: 'My notes on a button with emojis' },
|
||||
};
|
||||
|
||||
export const WithSomeEmojiAndAction = () => ({
|
||||
template: hbs`
|
||||
<button {{action onClick}}>
|
||||
<span role="img" aria-label="so cool">
|
||||
😀 😎 👍 💯
|
||||
</span>
|
||||
</button>
|
||||
`,
|
||||
context: {
|
||||
onClick: action('This was clicked'),
|
||||
},
|
||||
});
|
||||
|
||||
WithSomeEmojiAndAction.story = {
|
||||
name: 'with some emoji and action',
|
||||
parameters: { notes: 'My notes on a button with emojis' },
|
||||
};
|
||||
|
||||
export const ButtonWithLinkToAnotherStory = () => ({
|
||||
template: hbs`
|
||||
<button {{action onClick}}>
|
||||
Go to Welcome Story
|
||||
</button>
|
||||
`,
|
||||
context: {
|
||||
onClick: linkTo('Welcome'),
|
||||
},
|
||||
});
|
||||
|
||||
ButtonWithLinkToAnotherStory.story = {
|
||||
name: 'button with link to another story',
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user