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",
|
||||
"storybook": "start-storybook -p 6006",
|
||||
"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": [
|
||||
{
|
||||
|
|
|
@ -566,7 +566,7 @@ export default class NimblePicker extends React.PureComponent {
|
|||
})}
|
||||
</div>
|
||||
|
||||
{showPreview && (
|
||||
{(showPreview || showSkinTones) && (
|
||||
<div className="emoji-mart-bar">
|
||||
<Preview
|
||||
ref={this.setPreviewRef}
|
||||
|
@ -574,6 +574,7 @@ export default class NimblePicker extends React.PureComponent {
|
|||
title={title}
|
||||
emoji={emoji}
|
||||
showSkinTones={showSkinTones}
|
||||
showPreview={showPreview}
|
||||
emojiProps={{
|
||||
native: native,
|
||||
size: 38,
|
||||
|
|
|
@ -23,9 +23,10 @@ export default class Preview extends React.PureComponent {
|
|||
title,
|
||||
emoji: idleEmoji,
|
||||
i18n,
|
||||
showPreview,
|
||||
} = this.props
|
||||
|
||||
if (emoji) {
|
||||
if (emoji && showPreview) {
|
||||
var emojiData = getData(emoji, null, null, this.data),
|
||||
{ emoticons = [] } = emojiData,
|
||||
knownEmoticons = [],
|
||||
|
|
Loading…
Reference in New Issue