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-14.9.0.pre.rc.11 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.9.0.pre.rc.10 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.8.0.pre.alpha.PBNTR713dropdowncustomtriggerbug4696 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.9.0.pre.rc.9 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.8.0.pre.alpha.PLAY1680newwidthprop4661 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.8.0.pre.alpha.PLAY1658tanstackbump4657 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.8.0.pre.alpha.PLAY1649rolloutheightglobalprops4635 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.9.0.pre.rc.8 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.8.0.pre.alpha.PLAY1598floatinguiupgrade4617 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.9.0.pre.rc.7 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.9.0.pre.rc.6 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.9.0.pre.rc.5 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.8.0.pre.alpha.pbntr661createstickyleftprop4612 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.8.0.pre.alpha.play1648heightglobalprops4606 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.9.0.pre.rc.4 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.9.0.pre.rc.3 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.9.0.pre.rc.2 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.8.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4567 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.8.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4565 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-14.8.0.pre.alpha.PLAY1598floatinguiupgrade4563 app/pb_kits/playbook/pb_typeahead/components/Option.tsx