From ab2f17cfc128ab01533166206babe8abe6cffe69 Mon Sep 17 00:00:00 2001 From: Peder Johnsen Date: Sat, 23 Mar 2019 15:18:02 +0000 Subject: [PATCH] Add story --- stories/index.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/stories/index.js b/stories/index.js index 2a0c480..b04b12e 100644 --- a/stories/index.js +++ b/stories/index.js @@ -11,7 +11,8 @@ import { color, } from '@storybook/addon-knobs' -import { Picker, Emoji, emojiIndex } from '../dist' +import { Picker, Emoji, emojiIndex, NimbleEmojiIndex } from '../dist' +import data from '../data/all.json' import '../css/emoji-mart.css' const SETS = ['apple', 'google', 'twitter', 'emojione', 'messenger', 'facebook'] @@ -215,8 +216,9 @@ storiesOf('Headless Search', module) ) }) - .add('Skin tone', () => { - let results = emojiIndex.search(text('Search', 'thumbs'), { + .add('With skin tone from store', () => { + const nimbleEmojiIndex = new NimbleEmojiIndex(data) + let results = nimbleEmojiIndex.search(text('Search', 'christmas'), { custom: CUSTOM_EMOJIS, }) if (!results) { @@ -228,7 +230,12 @@ storiesOf('Headless Search', module) {results.map((emoji) => { return ( - + ) })}