UNPKG

@fremtind/jkl-radio-button-react

Version:
16 lines (15 loc) 887 B
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>>;