-
-
Save realStandal/d78e9d111d7538807e0f86d0f7351e1f to your computer and use it in GitHub Desktop.
@angular/flex-layout with Storybook
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
import { | |
Meta, | |
Story, | |
} from '@storybook/angular' | |
import { FlexLayoutModule } from '@angular/flex-layout' | |
import { Button, } from './button.component' | |
export default { | |
title: 'Molecule/Button', | |
component: Button, | |
decorators: [ | |
(storyFunc) => { | |
const story = storyFunc(); | |
return story; | |
}, | |
] | |
} as Meta; | |
const Template: Story<Button> = (args: Button) => ({ | |
component: Button, | |
props: args, | |
moduleMetadata: { | |
declarations: [Button], | |
imports: [FlexLayoutModule], | |
}, | |
template: ` | |
<div class="light"> | |
<atom-button | |
value={{value}} | |
variation={{variation}} | |
level={{level}} | |
size={{size}} | |
[block]="block"> | |
</atom-button> | |
</div> | |
` | |
}) | |
export const MyStory = Template.bind({}) | |
MyStory.args = ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment