import clsx from "clsx"; import { forwardRef } from "react"; import type { Size } from "@camome/system"; import { BaseProps } from "../../types"; import { FormField, FormFieldProps } from "../FormField"; import { UnstyledInput } from "../UnstyledInput"; import styles from "./styles.module.scss"; type OmittedNativeProps = "size"; type NativeProps = Omit; export type InputProps = { size?: Size; fill?: boolean; } & BaseProps & NativeProps & Pick, "description" | "error" | "label">; export const Input = forwardRef( ( { type = "text", size = "md", fill, description, error, label, id, className, ...inputProps }, forwardedRef ) => { const input = ( ); if (!label) return input; return ( {input} ); } ); Input.displayName = "Input";