Run prettier on docs/index.js

release
Etienne Lemay 2019-12-23 08:06:53 -05:00
parent ff9d416300
commit c778bc6084
No known key found for this signature in database
GPG Key ID: EE7CF89146BB28E9
1 changed files with 52 additions and 39 deletions

View File

@ -8,25 +8,26 @@ const CUSTOM_EMOJIS = [
name: 'Party Parrot', name: 'Party Parrot',
short_names: ['parrot'], short_names: ['parrot'],
keywords: ['party'], keywords: ['party'],
imageUrl: './images/parrot.gif' imageUrl: './images/parrot.gif',
}, },
{ {
name: 'Octocat', name: 'Octocat',
short_names: ['octocat'], short_names: ['octocat'],
keywords: ['github'], keywords: ['github'],
imageUrl: 'https://github.githubassets.com/images/icons/emoji/octocat.png' imageUrl: 'https://github.githubassets.com/images/icons/emoji/octocat.png',
}, },
{ {
name: 'Squirrel', name: 'Squirrel',
short_names: ['shipit', 'squirrel'], short_names: ['shipit', 'squirrel'],
keywords: ['github'], 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', name: 'Test Flag',
short_names: ['test'], short_names: ['test'],
keywords: ['test', 'flag'], 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_x: 1,
sheet_y: 1, sheet_y: 1,
size: 64, size: 64,
@ -48,20 +49,32 @@ class Example extends React.Component {
} }
render() { render() {
return <div> return (
<div>
<div className="row"> <div className="row">
<h1>Emoji Mart 🏬</h1> <h1>Emoji Mart 🏬</h1>
</div> </div>
<div className="row sets"> <div className="row sets">
{['native', 'apple', 'google', 'twitter', 'emojione', 'messenger', 'facebook'].map((set) => { {[
var props = { disabled: !this.state.native && set == this.state.set } '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) { if (set == 'native' && this.state.native) {
props.disabled = true props.disabled = true
} }
return <button return (
<button
key={set} key={set}
value={set} value={set}
onClick={() => { onClick={() => {
@ -71,19 +84,19 @@ class Example extends React.Component {
this.setState({ set: set, native: false }) this.setState({ set: set, native: false })
} }
}} }}
{...props}> {...props}
>
{set} {set}
</button> </button>
)
})} })}
</div> </div>
<div className="row"> <div className="row">
<Picker <Picker {...this.state} onSelect={console.log} />
{...this.state}
onSelect={console.log}
/>
</div> </div>
</div> </div>
)
} }
} }