import React from 'react'; import PropTypes from 'prop-types'; import { Remove } from '@buffetjs/icons'; import { Option as Wrapper } from '@buffetjs/styles'; import { upperFirst } from 'lodash'; import RemoveButton from './RemoveButton'; function Filter({ label, onClick, ...rest }) { const content = typeof label === 'string' ? {upperFirst(label)} : label; return ( {content} ); } Filter.defaultProps = { label: '', onClick: () => {}, }; Filter.propTypes = { label: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), onClick: PropTypes.func, }; export default Filter;