Sha256: 98eaa2edbb2a44b1e1a1099264a8a59453fbd61856b788c182a4062931609ed3

Contents?: true

Size: 746 Bytes

Versions: 831

Compression:

Stored size: 746 Bytes

Contents

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

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

const Option = (props: any) => {
  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

831 entries across 831 versions & 1 rubygems

Version Path
playbook_ui-12.28.0 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.27.0.pre.alpha.expandednotworking853 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.27.0 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.26.1.pre.alpha.railsmultilevelimprovements842 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.26.1.pre.alpha.railsmultilevelimprovements837 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.26.1.pre.alpha.PLAY860PhoneNumInputOptions836 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.26.1.pre.alpha.railsmultilevelimprovements835 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.26.1.pre.alpha.play716popoverkitcloseonclickissue833 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.26.1.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown831 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.26.1 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.26.0.pre.alpha.multiselectfixes825 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.26.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown822 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.26.0.pre.alpha.multiselectfixes821 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.26.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown818 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.26.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown817 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.26.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown815 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.26.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown813 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.26.0.pre.alpha.alphafix812 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.26.0.pre.alpha.alphafix810 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.26.0.pre.alpha.railsmultilevelimprovements805 app/pb_kits/playbook/pb_typeahead/components/Option.tsx