parent
83bd22dffd
commit
2c060c56bc
|
@ -48,7 +48,7 @@ import { Picker } from 'emoji-mart'
|
||||||
| **emojiTooltip** | | `false` | Show emojis short name when hovering (title) |
|
| **emojiTooltip** | | `false` | Show emojis short name when hovering (title) |
|
||||||
| **skin** | | | Forces skin color: `1, 2, 3, 4, 5, 6` |
|
| **skin** | | | Forces skin color: `1, 2, 3, 4, 5, 6` |
|
||||||
| **defaultSkin** | | `1` | Default skin color: `1, 2, 3, 4, 5, 6` |
|
| **defaultSkin** | | `1` | Default skin color: `1, 2, 3, 4, 5, 6` |
|
||||||
| **skinIcon** | | | The emoji used to pick a skin tone. Uses an emoji-less skin tone picker by default |
|
| **skinEmoji** | | | The emoji used to pick a skin tone. Uses an emoji-less skin tone picker by default |
|
||||||
| **style** | | | Inline styles applied to the root element. Useful for positioning |
|
| **style** | | | Inline styles applied to the root element. Useful for positioning |
|
||||||
| **title** | | `Emoji Mart™` | The title shown when no emojis are hovered |
|
| **title** | | `Emoji Mart™` | The title shown when no emojis are hovered |
|
||||||
| **notFoundEmoji** | | `sleuth_or_spy` | The emoji shown when there are no search results |
|
| **notFoundEmoji** | | `sleuth_or_spy` | The emoji shown when there are no search results |
|
||||||
|
|
|
@ -472,7 +472,7 @@ export default class NimblePicker extends React.PureComponent {
|
||||||
exclude,
|
exclude,
|
||||||
recent,
|
recent,
|
||||||
autoFocus,
|
autoFocus,
|
||||||
skinIcon,
|
skinEmoji,
|
||||||
notFound,
|
notFound,
|
||||||
notFoundEmoji,
|
notFoundEmoji,
|
||||||
} = this.props,
|
} = this.props,
|
||||||
|
@ -576,7 +576,7 @@ export default class NimblePicker extends React.PureComponent {
|
||||||
skinsProps={{
|
skinsProps={{
|
||||||
skin: skin,
|
skin: skin,
|
||||||
onChange: this.handleSkinChange,
|
onChange: this.handleSkinChange,
|
||||||
skinIcon: skinIcon,
|
skinEmoji: skinEmoji,
|
||||||
}}
|
}}
|
||||||
i18n={this.i18n}
|
i18n={this.i18n}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -84,15 +84,15 @@ export default class Preview extends React.PureComponent {
|
||||||
{showSkinTones && (
|
{showSkinTones && (
|
||||||
<div
|
<div
|
||||||
className={`emoji-mart-preview-skins${
|
className={`emoji-mart-preview-skins${
|
||||||
skinsProps.skinIcon ? ' custom' : ''
|
skinsProps.skinEmoji ? ' custom' : ''
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
{skinsProps.skinIcon ? (
|
{skinsProps.skinEmoji ? (
|
||||||
<SkinsEmoji
|
<SkinsEmoji
|
||||||
skin={skinsProps.skin}
|
skin={skinsProps.skin}
|
||||||
emojiProps={emojiProps}
|
emojiProps={emojiProps}
|
||||||
data={this.data}
|
data={this.data}
|
||||||
skinIcon={skinsProps.skinIcon}
|
skinEmoji={skinsProps.skinEmoji}
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
onChange={skinsProps.onChange}
|
onChange={skinsProps.onChange}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default class SkinsEmoji extends Skins {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { skin, emojiProps, data, skinIcon, i18n } = this.props
|
const { skin, emojiProps, data, skinEmoji, i18n } = this.props
|
||||||
const { opened } = this.state
|
const { opened } = this.state
|
||||||
const skinToneNodes = []
|
const skinToneNodes = []
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ export default class SkinsEmoji extends Skins {
|
||||||
className={`emoji-mart-skin-tone-${skinTone}`}
|
className={`emoji-mart-skin-tone-${skinTone}`}
|
||||||
>
|
>
|
||||||
{NimbleEmoji({
|
{NimbleEmoji({
|
||||||
emoji: skinIcon,
|
emoji: skinEmoji,
|
||||||
data: data,
|
data: data,
|
||||||
skin: skinTone,
|
skin: skinTone,
|
||||||
backgroundImageFn: emojiProps.backgroundImageFn,
|
backgroundImageFn: emojiProps.backgroundImageFn,
|
||||||
|
@ -62,7 +62,7 @@ SkinsEmoji.propTypes = {
|
||||||
skin: PropTypes.number.isRequired,
|
skin: PropTypes.number.isRequired,
|
||||||
emojiProps: PropTypes.object.isRequired,
|
emojiProps: PropTypes.object.isRequired,
|
||||||
skinTone: PropTypes.number,
|
skinTone: PropTypes.number,
|
||||||
skinIcon: PropTypes.string.isRequired,
|
skinEmoji: PropTypes.string.isRequired,
|
||||||
i18n: PropTypes.object,
|
i18n: PropTypes.object,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ const PickerPropTypes = {
|
||||||
imageUrl: PropTypes.string.isRequired,
|
imageUrl: PropTypes.string.isRequired,
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
skinIcon: PropTypes.string,
|
skinEmoji: PropTypes.string,
|
||||||
notFound: PropTypes.func,
|
notFound: PropTypes.func,
|
||||||
notFoundEmoji: PropTypes.string,
|
notFoundEmoji: PropTypes.string,
|
||||||
icons: PropTypes.object,
|
icons: PropTypes.object,
|
||||||
|
@ -104,7 +104,7 @@ const PickerDefaultProps = {
|
||||||
emojiTooltip: EmojiDefaultProps.tooltip,
|
emojiTooltip: EmojiDefaultProps.tooltip,
|
||||||
autoFocus: false,
|
autoFocus: false,
|
||||||
custom: [],
|
custom: [],
|
||||||
skinIcon: '',
|
skinEmoji: '',
|
||||||
notFound: () => {},
|
notFound: () => {},
|
||||||
notFoundEmoji: 'sleuth_or_spy',
|
notFoundEmoji: 'sleuth_or_spy',
|
||||||
icons: {},
|
icons: {},
|
||||||
|
|
|
@ -184,7 +184,7 @@ storiesOf('Picker', module)
|
||||||
<Picker
|
<Picker
|
||||||
native={boolean('Unicode', true)}
|
native={boolean('Unicode', true)}
|
||||||
emojiSize={24}
|
emojiSize={24}
|
||||||
skinIcon={text('Skin Preview Icon', 'v')}
|
skinEmoji={text('Skin Preview Icon', 'v')}
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue