Run prettier on docs/index.js
parent
ff9d416300
commit
c778bc6084
|
@ -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,20 +49,32 @@ class Example extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
return <div>
|
||||
return (
|
||||
<div>
|
||||
<div className="row">
|
||||
<h1>Emoji Mart 🏬</h1>
|
||||
</div>
|
||||
|
||||
<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) {
|
||||
props.disabled = true
|
||||
}
|
||||
|
||||
return <button
|
||||
return (
|
||||
<button
|
||||
key={set}
|
||||
value={set}
|
||||
onClick={() => {
|
||||
|
@ -71,19 +84,19 @@ class Example extends React.Component {
|
|||
this.setState({ set: set, native: false })
|
||||
}
|
||||
}}
|
||||
{...props}>
|
||||
{...props}
|
||||
>
|
||||
{set}
|
||||
</button>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
|
||||
<div className="row">
|
||||
<Picker
|
||||
{...this.state}
|
||||
onSelect={console.log}
|
||||
/>
|
||||
<Picker {...this.state} onSelect={console.log} />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue