Sha256: dd93b3fb83d9d52d21aa68f9d818de7700569e4fe0e99e8fee3201b426ee0f07

Contents?: true

Size: 776 Bytes

Versions: 9

Compression:

Stored size: 776 Bytes

Contents

import React from 'react'
import { components } from 'react-select'

import User from '../../pb_user/_user'

const Option = (props: any): React.ReactElement => {
  const {
    imageUrl,
  } = props.data
  const { valueComponent } = props.selectProps

  return (
    <components.Option {...props}>
      <>
        {!valueComponent && imageUrl &&
          <User
              align="left"
              avatarUrl={imageUrl}
              dark={props.selectProps.dark}
              name={props.label}
              orientation="horizontal"
          />
        }

        {valueComponent &&
          valueComponent(props.data)
        }

        {!valueComponent && !imageUrl &&
          props.label
        }
      </>
    </components.Option>
  )
}

export default Option

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
playbook_ui-13.33.0.pre.alpha.PLAY14143318 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-13.33.0.pre.alpha.PLAY14143312 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-13.33.0.pre.alpha.PBNTR405dropdownformfixesrails3311 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-13.33.0.pre.alpha.PLAY1454formpillicons3309 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-13.33.0.pre.alpha.PLAY14143306 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-13.33.0 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-13.32.0.pre.alpha.PBNTR405dropdownformfixesrails3301 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-13.32.0.pre.alpha.PLAY14143297 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-13.31.0.pre.alpha.PLAY10863204 app/pb_kits/playbook/pb_typeahead/components/Option.tsx