UNPKG

@navinc/base-react-components

Version:
19 lines (18 loc) 1 kB
import { ChangeEvent, ReactNode } from 'react'; type OptionType = { value: string; [key: string]: any; }; type OptionsGroupProps = { name: string; options: OptionType[]; renderOption: (args: OptionType) => ReactNode; value?: string; onChange?: (e: ChangeEvent<HTMLInputElement>) => void; className?: string; }; /** * A controlled component that takes `options` array of objects and renders a list of items using `renderOptions` with some pre-styling: border radius, border color, hover, spacing, etc. It uses a radio input under the hood so we have full browser default accessibility. */ export declare const OptionsGroup: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<OptionsGroupProps, never>> & string & Omit<({ options, renderOption, value: selectedVal, onChange, name, className, }: OptionsGroupProps) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>; export {};