import React, { ChangeEvent, CSSProperties } from "react"; import "./select.css"; interface CustomStyleCSS extends CSSProperties { "--codex-select-background"?: string; "--codex-color"?: string; "--codex-border-radius"?: string; "--codex-select-border"?: string; "--codex-select-icon-url"?: string; } type Props = { label: string; id: string; /** * Tuple array for options. * The first item is the value and the second is the text. */ options: [string, string][]; /** * OnChange event called whenever the select value changed. */ onChange?: (e: ChangeEvent) => void | Promise; /** * Apply custom css variables. */ style?: CustomStyleCSS; defaultValue?: string; className?: string; }; export function Select({ label, id, options, onChange, style, className, defaultValue, }: Props) { return ( <>
); }