Add Headless Search to Storybook
parent
9665c5d8fc
commit
648823c761
|
@ -4,7 +4,7 @@ import { storiesOf } from '@storybook/react';
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
import { withKnobs, text, boolean, number, select, color } from '@storybook/addon-knobs';
|
import { withKnobs, text, boolean, number, select, color } from '@storybook/addon-knobs';
|
||||||
|
|
||||||
import { Picker, Emoji } from '../src';
|
import { Picker, Emoji, emojiIndex } from '../src';
|
||||||
import '../css/emoji-mart.css';
|
import '../css/emoji-mart.css';
|
||||||
|
|
||||||
const SETS = ['apple', 'google', 'twitter', 'emojione', 'messenger', 'facebook']
|
const SETS = ['apple', 'google', 'twitter', 'emojione', 'messenger', 'facebook']
|
||||||
|
@ -52,3 +52,13 @@ storiesOf('Emoji', module)
|
||||||
skin={number('Skin tone', 1)}
|
skin={number('Skin tone', 1)}
|
||||||
/>
|
/>
|
||||||
));
|
));
|
||||||
|
|
||||||
|
storiesOf('Headless Search', module)
|
||||||
|
.addDecorator(withKnobs)
|
||||||
|
.add('default', () => (
|
||||||
|
<div>
|
||||||
|
{emojiIndex.search(text('Search', 'christmas')).map((o) => {
|
||||||
|
return <span style={{ fontSize: '2em', marginLeft: '.2em' }}>{o.native}</span>
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
));
|
||||||
|
|
Loading…
Reference in New Issue