@postenbring/hedwig-react
Version:
React components for [Hedwig Design System](https://github.com/bring/hedwig-design-system).
24 lines • 1 kB
TypeScript
import type { FieldsetHTMLAttributes, HTMLAttributes, ReactNode, CSSProperties } from "react";
import { type ErrorMessageProps } from "../error-message";
export interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {
className?: string;
style?: CSSProperties;
/**
* Providing an errorMessage will also give contained Checkboxes or Radio buttons
* error styling and aria to indicate invalid state.
*
* For Radio buttons you are even better off using RadioGroup.
*/
errorMessage?: ReactNode;
legendProps?: HTMLAttributes<HTMLElement> & {
size: "default" | "large";
};
legend: ReactNode;
children: ReactNode;
errorMessageProps?: Partial<ErrorMessageProps>;
}
export declare const useFieldsetContext: () => {
hasError: boolean;
};
export declare const Fieldset: import("react").ForwardRefExoticComponent<FieldsetProps & import("react").RefAttributes<HTMLFieldSetElement>>;
//# sourceMappingURL=fieldset.d.ts.map