docs: Move `With custom data` to correct position (#377)

Looks like the `With custom data` section of `Headless search` got pushed down by the `Get emoji data from Native` stuff.
release
Peder Johnsen 2019-12-21 17:13:20 +00:00 committed by Nolan Lawson
parent 208099c2dc
commit edcd64b101
1 changed files with 9 additions and 9 deletions

View File

@ -303,6 +303,15 @@ emojiIndex.search('christmas').map((o) => o.native)
// => [🎄, 🎅🏼, 🔔, 🎁, ⛄️, ❄️]
```
### With custom data
```js
import data from 'emoji-mart/datasets/messenger'
import { NimbleEmojiIndex } from 'emoji-mart'
let emojiIndex = new NimbleEmojiIndex(data)
emojiIndex.search('christmas')
```
## Get emoji data from Native
You can get emoji data from native emoji unicode using the `getEmojiDataFromNative` util function.
@ -333,15 +342,6 @@ emojiData: {
}
```
### With custom data
```js
import data from 'emoji-mart/datasets/messenger'
import { NimbleEmojiIndex } from 'emoji-mart'
let emojiIndex = new NimbleEmojiIndex(data)
emojiIndex.search('christmas')
```
## Storage
By default EmojiMart will store user chosen skin and frequently used emojis in `localStorage`. That can however be overwritten should you want to store these in your own storage.