Show preview panel when showPreview is false but showSkinTones is true.

This is necessary in order to be able to show skin tone picker even when
one desires for the mouseover preview to be invisible. This is an
important case because mouseover displays must be disabled in order to
enable single click emoji typing on iOS without disabling the skin tone
picker.
release
Kaylee Mann 2019-03-08 14:00:50 +09:00
parent 7c2e2a840b
commit caba7d0b34
2 changed files with 4 additions and 2 deletions

View File

@ -560,7 +560,7 @@ export default class NimblePicker extends React.PureComponent {
})}
</div>
{showPreview && (
{(showPreview || showSkinTones) && (
<div className="emoji-mart-bar">
<Preview
ref={this.setPreviewRef}
@ -568,6 +568,7 @@ export default class NimblePicker extends React.PureComponent {
title={title}
emoji={emoji}
showSkinTones={showSkinTones}
showPreview={showPreview}
emojiProps={{
native: native,
size: 38,

View File

@ -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 = [],