stargaze-studio/components/badges/queries/Combobox.hooks.ts
2023-02-19 19:57:40 +03:00

9 lines
262 B
TypeScript

import { useState } from 'react'
import type { QueryListItem } from './query'
export const useQueryComboboxState = () => {
const [value, setValue] = useState<QueryListItem | null>(null)
return { value, onChange: (item: QueryListItem) => setValue(item) }
}