Add story
parent
51a0879ec1
commit
ab2f17cfc1
|
@ -11,7 +11,8 @@ import {
|
||||||
color,
|
color,
|
||||||
} from '@storybook/addon-knobs'
|
} 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'
|
import '../css/emoji-mart.css'
|
||||||
|
|
||||||
const SETS = ['apple', 'google', 'twitter', 'emojione', 'messenger', 'facebook']
|
const SETS = ['apple', 'google', 'twitter', 'emojione', 'messenger', 'facebook']
|
||||||
|
@ -215,8 +216,9 @@ storiesOf('Headless Search', module)
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
.add('Skin tone', () => {
|
.add('With skin tone from store', () => {
|
||||||
let results = emojiIndex.search(text('Search', 'thumbs'), {
|
const nimbleEmojiIndex = new NimbleEmojiIndex(data)
|
||||||
|
let results = nimbleEmojiIndex.search(text('Search', 'christmas'), {
|
||||||
custom: CUSTOM_EMOJIS,
|
custom: CUSTOM_EMOJIS,
|
||||||
})
|
})
|
||||||
if (!results) {
|
if (!results) {
|
||||||
|
@ -228,7 +230,12 @@ storiesOf('Headless Search', module)
|
||||||
{results.map((emoji) => {
|
{results.map((emoji) => {
|
||||||
return (
|
return (
|
||||||
<span key={emoji.id} style={{ marginLeft: '1.4em' }}>
|
<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>
|
</span>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
|
|
Loading…
Reference in New Issue