@react-md/form
Version:
This package is for creating all the different form input types.
33 lines (32 loc) • 1.19 kB
TypeScript
import type { CSSProperties, FieldsetHTMLAttributes, ReactNode } from "react";
export interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {
/**
* The legend to display. This is required since a fieldset loses most of its'
* benefit for accessibility without a legend.
*/
legend: ReactNode;
/**
* An optional style to apply to the legend element.
*/
legendStyle?: CSSProperties;
/**
* An optional classname to apply to the legend.
*/
legendClassName?: string;
/**
* Boolean if the legend should only be styled to be visible for screen
* readers.
*/
legendSROnly?: boolean;
/**
* Boolean if the fieldset should remove the default browser styles of margin,
* padding, and border.
*/
unstyled?: boolean;
}
/**
* This is a simple wrapper for the `<fieldset>` that defaults to removing
* the default styles of a border, padding, and margin and having a screen-reader
* visible only legend element for added accessibility.
*/
export declare const Fieldset: import("react").ForwardRefExoticComponent<FieldsetProps & import("react").RefAttributes<HTMLFieldSetElement>>;