import {JSX, mergeProps, splitProps, useContext} from "solid-js"; import classNames from "./classnames"; import {useBootstrapPrefix} from "./ThemeProvider"; import {BsPrefixOnlyProps, BsPrefixRefForwardingComponent} from "./helpers"; import FormContext from "./FormContext"; export interface FormSelectProps extends BsPrefixOnlyProps, Omit, "size"> { htmlSize?: number; size?: "sm" | "lg"; isValid?: boolean; isInvalid?: boolean; } const defaultProps = { isValid: false, isInvalid: false, }; const FormSelect: BsPrefixRefForwardingComponent<"select", FormSelectProps> = ( p: FormSelectProps, ) => { const [local, props] = splitProps(mergeProps(defaultProps, p), [ "bsPrefix", "size", "htmlSize", "class", "isValid", "isInvalid", "id", ]); const formContext = useContext(FormContext); const bsPrefix = useBootstrapPrefix(local.bsPrefix, "form-select"); return (