Set Emoji.propTypes.set as an enum

release
Etienne Lemay 2016-10-26 20:55:44 -04:00
parent f43304399d
commit ecc086260a
2 changed files with 4 additions and 4 deletions

View File

@ -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,

View File

@ -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,
}