From ecc086260a7ddc33f4252173abb41472730c2d2c Mon Sep 17 00:00:00 2001 From: Etienne Lemay Date: Wed, 26 Oct 2016 20:55:44 -0400 Subject: [PATCH] Set Emoji.propTypes.set as an enum --- src/components/emoji.js | 2 +- src/components/picker.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/emoji.js b/src/components/emoji.js index 329f081..cc4da4a 100644 --- a/src/components/emoji.js +++ b/src/components/emoji.js @@ -86,10 +86,10 @@ export default class Emoji extends React.Component { Emoji.propTypes = { skin: React.PropTypes.number, - set: React.PropTypes.string, onOver: React.PropTypes.func, onLeave: React.PropTypes.func, onClick: React.PropTypes.func, + set: React.PropTypes.oneOf(['apple', 'google', 'twitter', 'emojione']), size: React.PropTypes.number.isRequired, emoji: React.PropTypes.oneOfType([ React.PropTypes.string, diff --git a/src/components/picker.js b/src/components/picker.js index 44029a2..6e864a7 100644 --- a/src/components/picker.js +++ b/src/components/picker.js @@ -6,7 +6,7 @@ import data from '../../data' import store from '../utils/store' import frequently from '../utils/frequently' -import {Anchors, Category, Preview, Search} from '.' +import {Anchors, Category, Emoji, Preview, Search} from '.' const RECENT_CATEGORY = { name: 'Recent', emojis: null } const SEARCH_CATEGORY = { name: 'Search', emojis: null, anchor: RECENT_CATEGORY } @@ -289,7 +289,7 @@ Picker.propTypes = { title: React.PropTypes.string, emoji: React.PropTypes.string, color: React.PropTypes.string, - set: React.PropTypes.string, + set: Emoji.propTypes.set, } Picker.defaultProps = { @@ -301,5 +301,5 @@ Picker.defaultProps = { title: 'Emoji Martâ„¢', emoji: 'department_store', color: '#ae65c5', - set: 'apple', + set: Emoji.defaultProps.set, }