/** * @file Option & OptionGroup * @desc 对外的 Option & OptionGroup 组件定义 */ import { ReactNode, LiHTMLAttributes } from 'react' import { WithRef } from '../utils/type' import { Value } from './common' export interface OptionProps { /** 值 */ value: T; /** 是否禁用 */ disabled?: boolean; /** 展示内容 */ children: ReactNode; /** 需要传给 `option` 的 html 属性 */ rootHtmlProps?: WithRef, HTMLLIElement>; } export function Option({ value, disabled = false, children }: OptionProps) { return null } export interface OptionGroupProps { /** 标题 */ title: string; /** 内容(Option) */ children: ReactNode; } export function OptionGroup(props: OptionGroupProps) { return null }