Support inline picker style

release
Etienne Lemay 2016-07-11 14:08:41 -04:00
parent f9053d21bb
commit 042c381d3e
1 changed files with 4 additions and 2 deletions

View File

@ -187,11 +187,11 @@ export default class Picker extends React.Component {
}
render() {
var { perLine, emojiSize, sheetURL } = this.props,
var { perLine, emojiSize, sheetURL, style } = this.props,
{ skin } = this.state,
width = (perLine * (emojiSize + 12)) + 12 + 2
return <div style={{width: width}} className='emoji-picker'>
return <div style={{...style, width: width}} className='emoji-picker'>
<div className='emoji-picker-bar'>
<Anchors
ref='anchors'
@ -248,6 +248,7 @@ Picker.propTypes = {
skin: React.PropTypes.number,
perLine: React.PropTypes.number,
emojiSize: React.PropTypes.number,
style: React.PropTypes.object,
sheetURL: React.PropTypes.string.isRequired,
}
@ -255,5 +256,6 @@ Picker.defaultProps = {
onClick: (() => {}),
emojiSize: 24,
perLine: 9,
style: {},
skin: 1,
}