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.38.0.pre.alpha.PLAY932removemomentqp1088 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.38.0.pre.alpha.PLAY966collapsiblenav41086 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.38.0.pre.alpha.audiencesalpha1083 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.38.0.pre.alpha.PLAY966collapsiblenav41082 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.38.0.pre.alpha.PLAYaddingdatapropselectkit1080 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.37.0.pre.alpha.PLAY951collapsiblenav31078 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.38.0.pre.alpha.playbook123801077 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.37.0.pre.alpha.PLAY951collapsiblenav31074 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.37.0.pre.alpha.PLAY951collapsiblenav31073 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.37.0.pre.alpha.PLAYaddingdatapropselectkit1071 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.38.0 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.37.0.pre.alpha.svgiconmethods1064 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.37.0.pre.alpha.PLAY951collapsiblenav31062 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.37.0 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.36.0.pre.alpha.svgiconmethods1059 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.36.0.pre.alpha.PLAY936momentjs1058 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.36.0.pre.alpha.PLAY936momentjs1050 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.36.0.pre.alpha.PLAY936momentjs1047 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.36.0.pre.alpha.svgiconmethods1043 app/pb_kits/playbook/pb_typeahead/components/Option.tsx
playbook_ui-12.36.0.pre.alpha.PLAY942collapsiblenav21035 app/pb_kits/playbook/pb_typeahead/components/Option.tsx