How to use the emoji-mart.Picker.propTypes function in emoji-mart

To help you get started, weโ€™ve selected a few emoji-mart examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github helpscout / hsds-react / src / components / EmojiPicker / index.js View on Github external
import React from 'react'
import PropTypes from 'prop-types'
import { emojiIndex, Picker } from 'emoji-mart'
import classNames from '../../utilities/classNames'

export const propTypes = Object.assign(Picker.propTypes, {
  showPreview: PropTypes.bool,
})

const defaultProps = {
  color: '#3197d6',
  emoji: 'point_up',
  set: 'apple',
  skin: 1,
  title: 'Pick an emoji',
  showPreview: false,
}

const EmojiPicker = props => {
  const { className, showPreview, style, ...rest } = props

  const componentClassName = classNames(