Use category labels based on Apple’s
parent
de98e7a729
commit
6237fb7fac
|
@ -3,6 +3,19 @@ import React from 'react'
|
|||
import {frequently} from '../utils'
|
||||
import {Emoji} from '.'
|
||||
|
||||
const LABELS = {
|
||||
'Search': 'Search Results',
|
||||
'Recent': 'Frequently Used',
|
||||
'People': 'Smileys & People',
|
||||
'Nature': 'Animals & Nature',
|
||||
'Foods': 'Food & Drink',
|
||||
'Activity': 'Activity',
|
||||
'Places': 'Travel & Places',
|
||||
'Objects': 'Objects',
|
||||
'Symbols': 'Symbols',
|
||||
'Flags': 'Flags',
|
||||
}
|
||||
|
||||
export default class Category extends React.Component {
|
||||
componentDidMount() {
|
||||
this.container = this.refs.container
|
||||
|
@ -83,7 +96,7 @@ export default class Category extends React.Component {
|
|||
|
||||
return <div ref='container' className='emoji-picker-category' style={containerStyles}>
|
||||
<div style={labelStyles} data-name={name} className='emoji-picker-category-label'>
|
||||
<span style={labelSpanStyles} ref='label'>{name}</span>
|
||||
<span style={labelSpanStyles} ref='label'>{LABELS[name]}</span>
|
||||
</div>
|
||||
|
||||
{emojis && emojis.map((emoji) =>
|
||||
|
|
|
@ -122,7 +122,7 @@ export default class Picker extends React.Component {
|
|||
this.setState({ categories: DEFAULT_CATEGORIES })
|
||||
} else {
|
||||
this.setState({ categories: [{
|
||||
name: 'Search Results',
|
||||
name: 'Search',
|
||||
emojis: emojis,
|
||||
}]})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue