Skip to content

Instantly share code, notes, and snippets.

@realStandal
Forked from isNotOkay/index.js
Last active December 1, 2020 02:55
Show Gist options
  • Save realStandal/d78e9d111d7538807e0f86d0f7351e1f to your computer and use it in GitHub Desktop.
Save realStandal/d78e9d111d7538807e0f86d0f7351e1f to your computer and use it in GitHub Desktop.
@angular/flex-layout with Storybook
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