[ui][typeahead] tweak chevron icon and updates stories

pull/368/head
Yangshun Tay 2 years ago
parent 3fe24cff3a
commit c7a0c095de

@ -17,6 +17,9 @@ export default {
noResultsMessage: { noResultsMessage: {
control: 'text', control: 'text',
}, },
placeholder: {
control: 'text',
},
}, },
component: Typeahead, component: Typeahead,
parameters: { parameters: {

@ -1,7 +1,7 @@
import clsx from 'clsx'; import clsx from 'clsx';
import { Fragment, useState } from 'react'; import { Fragment, useState } from 'react';
import { Combobox, Transition } from '@headlessui/react'; import { Combobox, Transition } from '@headlessui/react';
import { ChevronUpDownIcon } from '@heroicons/react/20/solid'; import { ChevronDownIcon } from '@heroicons/react/20/solid';
export type TypeaheadOption = Readonly<{ export type TypeaheadOption = Readonly<{
// String value to uniquely identify the option. // String value to uniquely identify the option.
@ -86,7 +86,7 @@ export default function Typeahead({
}} }}
/> />
<Combobox.Button className="absolute inset-y-0 right-0 flex items-center pr-2"> <Combobox.Button className="absolute inset-y-0 right-0 flex items-center pr-2">
<ChevronUpDownIcon <ChevronDownIcon
aria-hidden="true" aria-hidden="true"
className="h-5 w-5 text-slate-400" className="h-5 w-5 text-slate-400"
/> />

Loading…
Cancel
Save