* Added prettier for front-end code formatting. * Prettier runs on JSX too now Modified supported extensions for running prettier. * Added some documentation in the README about prettier, husky and lint-staged. * package-lock.json updated. * Keep lint-staged package-manager agnostic (#196) * Remove code-breaking comma
19 lines
569 B
JavaScript
19 lines
569 B
JavaScript
import { h } from 'preact';
|
|
|
|
import { storiesOf } from '@storybook/react';
|
|
import { action } from '@storybook/addon-actions';
|
|
import { linkTo } from '@storybook/addon-links';
|
|
|
|
import { Button, Welcome } from '@storybook/react/demo';
|
|
|
|
storiesOf('Welcome', module).add('to Storybook', () => (
|
|
<Welcome showApp={linkTo('Button')} />
|
|
));
|
|
|
|
storiesOf('Button', module)
|
|
.add('with text', () => (
|
|
<Button onClick={action('clicked')}>Hello Button</Button>
|
|
))
|
|
.add('with some emoji', () => (
|
|
<Button onClick={action('clicked')}>😀 😎 👍 💯</Button>
|
|
));
|