import { create , tsx } from '@dojo/framework/core/vdom' ; import ChipTypeahead from '@dojo/widgets/chip-typeahead' ; import Example from '../../Example' ; import { createResourceTemplate , createResourceMiddleware } from '@dojo/framework/core/middleware/resources' ; import { ListOption } from '@dojo/widgets/list' ; const resource = createResourceMiddleware ( ) ; const factory = create ( { resource } ) ; const options = [ { value : 'cheese' , label : 'Cheese 🧀' } , { value : 'pineapple' , label : 'Pineapple 🍍' } , { value : 'pepperoni' , label : 'Pepperoni 🍕' } , { value : 'onions' , label : 'Onions 🧅' } ] ; const template = createResourceTemplate < ListOption > ( 'value' ) ; export default factory ( function Duplicates ( { id , middleware : { resource } } ) { return ( < Example > < ChipTypeahead resource = { resource ( { template : template ( { id , data : options } ) } ) } duplicates > { { label : 'Select Pizza Toppings' } } < /ChipTypeahead> < /Example>); } ) ;