Add story
parent
51a0879ec1
commit
ab2f17cfc1
|
@ -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 (
|
||||
<span key={emoji.id} style={{ marginLeft: '1.4em' }}>
|
||||
<Emoji native={true} emoji={emoji} size={48} />
|
||||
<Emoji
|
||||
native={true}
|
||||
emoji={emoji}
|
||||
skin={emoji.skin || 1}
|
||||
size={48}
|
||||
/>
|
||||
</span>
|
||||
)
|
||||
})}
|
||||
|
|
Loading…
Reference in New Issue