import type { ComponentProps } from "solid-js";
import { Show, splitProps } from "solid-js";
import { cn } from "@/lib/cn";
export type InputProps = ComponentProps<"input"> & {
/**
* Message shown under the field. Marks it invalid and describes it for
* assistive tech; needs an `id` so the message can be linked.
*/
error?: string;
};
export function Input(props: InputProps) {
const [local, rest] = splitProps(props, ["class", "error"]);
const errorId = () => (props.id ? `${props.id}-error` : undefined);
return (
<>