@fremtind/jkl-radio-button-react
Version:
Jøkul react radio button components
16 lines (15 loc) • 887 B
TypeScript
import { SupportLabelProps } from "@fremtind/jkl-input-group-react";
import React, { InputHTMLAttributes, ChangeEventHandler, ReactNode } from "react";
export interface RadioButtonProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "children"> {
children?: ReactNode;
value: string;
/** Kan også settes på RadioButtonGroup, men settes på RadioButton f. eks. av react-hook-form */
name?: string;
/** Kan også settes på RadioButtonGroup, men settes på RadioButton f. eks. av react-hook-form */
onChange?: ChangeEventHandler<HTMLInputElement>;
/** @deprecated Bruk children */
label?: ReactNode;
helpLabel?: ReactNode;
supportLabelProps?: Omit<SupportLabelProps, "id" | "errorLabel" | "helpLabel" | "density">;
}
export declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & React.RefAttributes<HTMLInputElement>>;