Sha256: 193b35fcba123b457f8044f782d5772a86664bfcb819e1161fa943300842b6d9

Contents?: true

Size: 662 Bytes

Versions: 1

Compression:

Stored size: 662 Bytes

Contents

/* @flow */

import React, { useState } from 'react'
import { Typeahead } from '../..'

const initOptions = [
  { label: 'Windows', value: '#FFA500' },
  { label: 'Siding', value: '#FF0000' },
  { label: 'Doors', value: '#00FF00' },
  { label: 'Roofs', value: '#0000FF' },
]

const TypeaheadWithPills = (props) => {
  const [values, setValues] = useState([])
  return (
    <>
      <Typeahead
          badges
          createable
          isMulti
          label="Colors"
          onChange={(value) => console.log(value)}
          options={initOptions}
          placeholder=""
          {...props}
      />
    </>
  )
}

export default TypeaheadWithPills

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
playbook_ui-8.1.0.pre.alpha1 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx