From 2ff225b13111c95f175ee0b9fcf4868ad053e78c Mon Sep 17 00:00:00 2001 From: kennybll Date: Fri, 30 Nov 2018 09:27:55 -0500 Subject: [PATCH] Add to README.md for support of spritesheets --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5207216..9d584f3 100644 --- a/README.md +++ b/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, + }, ]