diff --git a/docs/index.js b/docs/index.js index 1e5a2c8..62719b1 100644 --- a/docs/index.js +++ b/docs/index.js @@ -8,25 +8,26 @@ const CUSTOM_EMOJIS = [ name: 'Party Parrot', short_names: ['parrot'], keywords: ['party'], - imageUrl: './images/parrot.gif' + imageUrl: './images/parrot.gif', }, { name: 'Octocat', short_names: ['octocat'], keywords: ['github'], - imageUrl: 'https://github.githubassets.com/images/icons/emoji/octocat.png' + imageUrl: 'https://github.githubassets.com/images/icons/emoji/octocat.png', }, { name: 'Squirrel', short_names: ['shipit', 'squirrel'], keywords: ['github'], - imageUrl: 'https://github.githubassets.com/images/icons/emoji/shipit.png' + imageUrl: 'https://github.githubassets.com/images/icons/emoji/shipit.png', }, { name: 'Test Flag', short_names: ['test'], keywords: ['test', 'flag'], - spriteUrl: 'https://unpkg.com/emoji-datasource-twitter@4.0.4/img/twitter/sheets-256/64.png', + spriteUrl: + 'https://unpkg.com/emoji-datasource-twitter@4.0.4/img/twitter/sheets-256/64.png', sheet_x: 1, sheet_y: 1, size: 64, @@ -48,42 +49,54 @@ class Example extends React.Component { } render() { - return
-
-

Emoji Mart 🏬

+ return ( +
+
+

Emoji Mart 🏬

+
+ +
+ {[ + 'native', + 'apple', + 'google', + 'twitter', + 'emojione', + 'messenger', + 'facebook', + ].map((set) => { + var props = { + disabled: !this.state.native && set == this.state.set, + } + + if (set == 'native' && this.state.native) { + props.disabled = true + } + + return ( + + ) + })} +
+ +
+ +
- -
- {['native', 'apple', 'google', 'twitter', 'emojione', 'messenger', 'facebook'].map((set) => { - var props = { disabled: !this.state.native && set == this.state.set } - - if (set == 'native' && this.state.native) { - props.disabled = true - } - - return - })} -
- -
- -
-
+ ) } }