Skip to content

Commit

Permalink
Set Emoji.propTypes.skin as an enum
Browse files Browse the repository at this point in the history
  • Loading branch information
EtienneLem committed Oct 27, 2016
1 parent ecc0862 commit afe8825
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -25,7 +25,7 @@ import { Picker } from 'emoji-mart'
| **onClick** | | | Params: `(emoji, event) => {}` |
| **perLine** | | `9` | Number of emojis per line. While there’s no minimum or maximum, this will affect the picker’s width. This will set *Frequently Used* length as well (`perLine * 4`) |
| **set** | | `apple` | The emoji set: `'apple', 'google', 'twitter', 'emojione'` |
| **skin** | | `1` | Default skin color (1-6) |
| **skin** | | `1` | Default skin color: `1, 2, 3, 4, 5, 6` |
| **style** | | | Inline styles applied to the root element. Useful for positioning |
| **title** | | `Emoji Mart™` | The title shown when no emojis are hovered |

Expand Down Expand Up @@ -69,7 +69,7 @@ import { Emoji } from 'emoji-mart'
| **onLeave** | | | Params: `(emoji, event) => {}` |
| **onOver** | | | Params: `(emoji, event) => {}` |
| **set** | | `apple` | The emoji set: `'apple', 'google', 'twitter', 'emojione'` |
| **skin** | | `1` | Skin color (1-6) |
| **skin** | | `1` | Skin color: `1, 2, 3, 4, 5, 6` |

## Headless search
The `Picker` doesn’t have to be mounted for you to take advantage of the advanced search results.
Expand Down
2 changes: 1 addition & 1 deletion src/components/emoji.js
Expand Up @@ -85,10 +85,10 @@ export default class Emoji extends React.Component {
}

Emoji.propTypes = {
skin: React.PropTypes.number,
onOver: React.PropTypes.func,
onLeave: React.PropTypes.func,
onClick: React.PropTypes.func,
skin: React.PropTypes.oneOf([1, 2, 3, 4, 5, 6]),
set: React.PropTypes.oneOf(['apple', 'google', 'twitter', 'emojione']),
size: React.PropTypes.number.isRequired,
emoji: React.PropTypes.oneOfType([
Expand Down
4 changes: 2 additions & 2 deletions src/components/picker.js
Expand Up @@ -282,24 +282,24 @@ export default class Picker extends React.Component {

Picker.propTypes = {
onClick: React.PropTypes.func,
skin: React.PropTypes.number,
perLine: React.PropTypes.number,
emojiSize: React.PropTypes.number,
style: React.PropTypes.object,
title: React.PropTypes.string,
emoji: React.PropTypes.string,
color: React.PropTypes.string,
set: Emoji.propTypes.set,
skin: Emoji.propTypes.skin,
}

Picker.defaultProps = {
onClick: (() => {}),
emojiSize: 24,
perLine: 9,
style: {},
skin: 1,
title: 'Emoji Mart™',
emoji: 'department_store',
color: '#ae65c5',
set: Emoji.defaultProps.set,
skin: Emoji.defaultProps.skin,
}

0 comments on commit afe8825

Please sign in to comment.