Merge pull request #277 from kayleemann/master
Support case where showPreview is false but showSkinTones is true. Also add prepare script.nolan/hinaloe-test
commit
a871cacbf2
|
@ -76,7 +76,8 @@
|
||||||
"prepublishOnly": "npm run build",
|
"prepublishOnly": "npm run build",
|
||||||
"storybook": "start-storybook -p 6006",
|
"storybook": "start-storybook -p 6006",
|
||||||
"build-storybook": "build-storybook",
|
"build-storybook": "build-storybook",
|
||||||
"prettier": "prettier --write \"{src,scripts,spec}/**/*.js\""
|
"prettier": "prettier --write \"{src,scripts,spec}/**/*.js\"",
|
||||||
|
"prepare": "npm run build:dist"
|
||||||
},
|
},
|
||||||
"size-limit": [
|
"size-limit": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -566,7 +566,7 @@ export default class NimblePicker extends React.PureComponent {
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{showPreview && (
|
{(showPreview || showSkinTones) && (
|
||||||
<div className="emoji-mart-bar">
|
<div className="emoji-mart-bar">
|
||||||
<Preview
|
<Preview
|
||||||
ref={this.setPreviewRef}
|
ref={this.setPreviewRef}
|
||||||
|
@ -574,6 +574,7 @@ export default class NimblePicker extends React.PureComponent {
|
||||||
title={title}
|
title={title}
|
||||||
emoji={emoji}
|
emoji={emoji}
|
||||||
showSkinTones={showSkinTones}
|
showSkinTones={showSkinTones}
|
||||||
|
showPreview={showPreview}
|
||||||
emojiProps={{
|
emojiProps={{
|
||||||
native: native,
|
native: native,
|
||||||
size: 38,
|
size: 38,
|
||||||
|
|
|
@ -23,9 +23,10 @@ export default class Preview extends React.PureComponent {
|
||||||
title,
|
title,
|
||||||
emoji: idleEmoji,
|
emoji: idleEmoji,
|
||||||
i18n,
|
i18n,
|
||||||
|
showPreview,
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
if (emoji) {
|
if (emoji && showPreview) {
|
||||||
var emojiData = getData(emoji, null, null, this.data),
|
var emojiData = getData(emoji, null, null, this.data),
|
||||||
{ emoticons = [] } = emojiData,
|
{ emoticons = [] } = emojiData,
|
||||||
knownEmoticons = [],
|
knownEmoticons = [],
|
||||||
|
|
Loading…
Reference in New Issue