Add to README.md for support of spritesheets
parent
94baec171d
commit
2ff225b131
15
README.md
15
README.md
|
@ -220,7 +220,7 @@ Following the `dangerouslySetInnerHTML` example above, make sure the wrapping `s
|
|||
```
|
||||
|
||||
## Custom emojis
|
||||
You can provide custom emojis which will show up in their own category.
|
||||
You can provide custom emojis which will show up in their own category. You can either use a single image as imageUrl or use a spritesheet as shown in the second object.
|
||||
|
||||
```js
|
||||
import { Picker } from 'emoji-mart'
|
||||
|
@ -234,6 +234,19 @@ const customEmojis = [
|
|||
keywords: ['github'],
|
||||
imageUrl: 'https://assets-cdn.github.com/images/icons/emoji/octocat.png?v7'
|
||||
},
|
||||
{
|
||||
name: 'Test Flag',
|
||||
short_names: ['test'],
|
||||
text: '',
|
||||
emoticons: [],
|
||||
keywords: ['test', 'flag'],
|
||||
spriteUrl: 'https://unpkg.com/emoji-datasource-twitter@4.0.4/img/twitter/sheets-256/64.png',
|
||||
sheet_x: 1,
|
||||
sheet_y: 1,
|
||||
size: 64,
|
||||
sheetColumns: 52,
|
||||
sheetRows: 52,
|
||||
},
|
||||
]
|
||||
|
||||
<Picker custom={customEmojis} />
|
||||
|
|
Loading…
Reference in New Issue