2016-07-06 18:10:36 -03:00
|
|
|
import React from 'react';
|
2016-07-06 18:41:57 -03:00
|
|
|
import { storiesOf, action } from '@kadira/storybook';
|
2016-07-06 18:10:36 -03:00
|
|
|
|
2016-07-06 19:07:42 -03:00
|
|
|
import { FindBar } from '../FindBar';
|
2016-07-06 18:10:36 -03:00
|
|
|
|
|
|
|
const commands = [
|
2016-07-08 07:17:53 -03:00
|
|
|
{ id:'CREATE_COLLECTION', pattern: 'Create new Collection(:collectionName)' },
|
|
|
|
{ id:'CREATE_POST', pattern: 'Create new Post(:postName)' },
|
|
|
|
{ id:'CREATE_ARTICLE', pattern: 'Create new Article(:articleName)' },
|
|
|
|
{ id:'CREATE_FAQ', pattern: 'Create new FAQ item(:faqName as FAQ item name)' },
|
|
|
|
{ id:'ADD_NEWS', pattern: 'Add news item(:headline)' },
|
|
|
|
{ id:'ADD_USER', pattern: 'Add new User(:userName as User name)' },
|
|
|
|
{ id:'OPEN_SETTINGS', pattern: 'Go to Settings' },
|
2016-07-06 18:10:36 -03:00
|
|
|
];
|
|
|
|
|
2016-07-07 19:21:10 -03:00
|
|
|
const style = {
|
|
|
|
width: 800,
|
|
|
|
margin: 20
|
|
|
|
};
|
|
|
|
|
2016-07-06 18:10:36 -03:00
|
|
|
storiesOf('FindBar', module)
|
|
|
|
.add('Default View', () => (
|
2016-07-07 19:21:10 -03:00
|
|
|
<div style={style}>
|
|
|
|
<FindBar
|
|
|
|
commands={commands}
|
|
|
|
dispatch={action('DISPATCH')}
|
|
|
|
/>
|
|
|
|
</div>
|
2016-07-06 18:10:36 -03:00
|
|
|
));
|