mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-29 13:13:54 +08:00
[ui][typeahead] tweak chevron icon and updates stories
This commit is contained in:
@ -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"
|
||||||
/>
|
/>
|
||||||
|
Reference in New Issue
Block a user