/** * Select 下拉选择组件 * 设计稿参考: UIDesignSpec.md */ import React, { forwardRef } from 'react'; import { ChevronDown } from 'lucide-react'; export interface SelectOption { value: string; label: string; disabled?: boolean; } export interface SelectProps extends Omit, 'children'> { label?: string; error?: string; hint?: string; options: SelectOption[]; placeholder?: string; fullWidth?: boolean; } export const Select = forwardRef(({ label, error, hint, options, placeholder, fullWidth = true, className = '', disabled, ...props }, ref) => { return (
{label && ( )}
{error && (

{error}

)} {hint && !error && (

{hint}

)}
); }); Select.displayName = 'Select'; export default Select;