From 648823c7611469883ffef10a1b640c6ec69282bf Mon Sep 17 00:00:00 2001 From: Etienne Lemay Date: Wed, 27 Sep 2017 22:20:56 -0400 Subject: [PATCH] Add Headless Search to Storybook --- stories/index.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/stories/index.js b/stories/index.js index d7d7a41..b2a8fbf 100644 --- a/stories/index.js +++ b/stories/index.js @@ -4,7 +4,7 @@ import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; 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'; const SETS = ['apple', 'google', 'twitter', 'emojione', 'messenger', 'facebook'] @@ -52,3 +52,13 @@ storiesOf('Emoji', module) skin={number('Skin tone', 1)} /> )); + +storiesOf('Headless Search', module) + .addDecorator(withKnobs) + .add('default', () => ( +
+ {emojiIndex.search(text('Search', 'christmas')).map((o) => { + return {o.native} + })} +
+ ));