- Move studio from root to frontends/studio/ - Add owner-tools frontend for live blog admin UI - Add shared ui component library - Set up npm workspaces for frontends - Add enhanced code block extension for editor Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
33 lines
700 B
TypeScript
33 lines
700 B
TypeScript
interface SelectOption {
|
|
value: string
|
|
label: string
|
|
}
|
|
|
|
interface SelectProps {
|
|
value: string
|
|
onChange: (value: string) => void
|
|
options: SelectOption[]
|
|
placeholder?: string
|
|
className?: string
|
|
}
|
|
|
|
export function Select({ value, onChange, options, placeholder, className = '' }: SelectProps) {
|
|
return (
|
|
<select
|
|
value={value}
|
|
onChange={e => onChange(e.target.value)}
|
|
className={`input ${className}`}
|
|
>
|
|
{placeholder && (
|
|
<option value="" disabled>
|
|
{placeholder}
|
|
</option>
|
|
)}
|
|
{options.map(opt => (
|
|
<option key={opt.value} value={opt.value}>
|
|
{opt.label}
|
|
</option>
|
|
))}
|
|
</select>
|
|
)
|
|
}
|