Sha256: 7d8e8dd56e892636f97e02dbf32b905073041f55352e3353cc3913e90ba936fa
Contents?: true
Size: 1 KB
Versions: 17
Compression:
Stored size: 1 KB
Contents
/* @flow */ import React from 'react' import { components } from 'react-select' import { FormPill } from '../../' type Props = { data: object, multiValueTemplate: any, removeProps: any, selectProps: any, } const MultiValue = (props: Props) => { const { data, removeProps, selectProps, } = props const handleOnClick = () => { if (selectProps.onMultiValueClick) selectProps.onMultiValueClick(data) removeProps.onClick() } const { imageUrl, label } = data return ( <components.MultiValueContainer className="text_input_multivalue_container" {...props} > <If condition={imageUrl}> <FormPill avatarUrl={imageUrl} marginRight="xs" name={label} onClick={handleOnClick} /> <Else /> <FormPill marginRight="xs" onClick={handleOnClick} text={label} /> </If> </components.MultiValueContainer> ) } export default MultiValue
Version data entries
17 entries across 17 versions & 1 rubygems