From 6237fb7facca1f74f334e5bf055ad9d254ea515c Mon Sep 17 00:00:00 2001 From: Etienne Lemay Date: Thu, 7 Jul 2016 14:28:15 -0400 Subject: [PATCH] =?UTF-8?q?Use=20category=20labels=20based=20on=20Apple?= =?UTF-8?q?=E2=80=99s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/category.js | 15 ++++++++++++++- src/components/picker.js | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/components/category.js b/src/components/category.js index ea27794..56c8942 100644 --- a/src/components/category.js +++ b/src/components/category.js @@ -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
- {name} + {LABELS[name]}
{emojis && emojis.map((emoji) => diff --git a/src/components/picker.js b/src/components/picker.js index c2664ad..9cd5028 100644 --- a/src/components/picker.js +++ b/src/components/picker.js @@ -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, }]}) }