forked from missive/emoji-mart
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add to README.md for support of spritesheets
- Loading branch information
Showing
1 changed file
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected]/img/twitter/sheets-256/64.png', | ||
sheet_x: 1, | ||
sheet_y: 1, | ||
size: 64, | ||
sheetColumns: 52, | ||
sheetRows: 52, | ||
}, | ||
] | ||
|
||
<Picker custom={customEmojis} /> | ||
|