UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

39 lines 1.64 kB
import React from 'react'; import { FormControlCaption } from './FormControlCaption'; export type FormControlProps = { children?: React.ReactNode; /** * Whether the control allows user input */ disabled?: boolean; /** * The unique identifier for this control. Used to associate the label, validation text, and caption text */ id?: string; /** * If true, the user must specify a value for the input before the owning form can be submitted */ required?: boolean; /** * The direction the content flows. * Vertical layout is used by default, and horizontal layout is used for checkbox and radio inputs. */ layout?: 'horizontal' | 'vertical'; className?: string; style?: React.CSSProperties; }; declare const _default: React.ForwardRefExoticComponent<FormControlProps & React.RefAttributes<HTMLDivElement>> & { __SLOT__: symbol; Caption: typeof FormControlCaption; Label: import("../utils/types").FCWithSlotMarker<React.PropsWithChildren<{ htmlFor?: string; } & (((import("../internal/components/InputLabel").LabelProps | import("../internal/components/InputLabel").LegendOrSpanProps) & { children?: React.ReactNode | undefined; }) & import("./FormControlLabel").Props)>>; LeadingVisual: import("../utils/types").FCWithSlotMarker<React.PropsWithChildren<{ style?: React.CSSProperties; }>>; Validation: import("../utils/types").FCWithSlotMarker<React.PropsWithChildren<import("./_FormControlValidation").FormControlValidationProps>>; }; export default _default; //# sourceMappingURL=FormControl.d.ts.map