Sha256: 12a14133b5b032ff64c74cb2636d255549a1bab86c85b82a91c2c3aff5bb94e2

Contents?: true

Size: 665 Bytes

Versions: 8

Compression:

Stored size: 665 Bytes

Contents

/* @flow */

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

import {
  User,
} from '../../'

const Option = (props: any) => {
  const {
    imageUrl,
  } = props.data

  return (
    <components.Option {...props}>
      <div>
        <Choose>
          <When condition={imageUrl}>
            <User
                align="left"
                avatarUrl={imageUrl}
                name={props.label}
                orientation="horizontal"
            />
          </When>
          <When condition={!imageUrl}>
            {props.label}
          </When>
        </Choose>
      </div>
    </components.Option>
  )
}

export default Option

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
playbook_ui-7.13.0.pre.alpha1 app/pb_kits/playbook/pb_typeahead/components/Option.jsx
playbook_ui-7.13.0 app/pb_kits/playbook/pb_typeahead/components/Option.jsx
playbook_ui-7.12.1 app/pb_kits/playbook/pb_typeahead/components/Option.jsx
playbook_ui-7.12.0 app/pb_kits/playbook/pb_typeahead/components/Option.jsx
playbook_ui-7.11.1 app/pb_kits/playbook/pb_typeahead/components/Option.jsx
playbook_ui-7.11.0 app/pb_kits/playbook/pb_typeahead/components/Option.jsx
playbook_ui-7.11.0.pre.alpha1 app/pb_kits/playbook/pb_typeahead/components/Option.jsx
playbook_ui-7.10.0 app/pb_kits/playbook/pb_typeahead/components/Option.jsx