UNPKG

beta-parity-react

Version:

Beta Parity React Components

108 lines 3.04 kB
import React from 'react'; import './index.css'; import './variables.css'; import { InputProps } from '../BaseInput'; import { BaseProps } from '../Base'; /** * Props for the Radio component. * * Extends properties from the `Input` component. */ export interface RadioProps extends InputProps { /** * The label for the Radio. * Can be a string or a React node. * * @memberof RadioProps */ label?: string | React.ReactNode; /** * The sub-label for the Radio. * Can be a string or a React node. * * @memberof RadioProps */ sublabel?: string | React.ReactNode; /** * Additional props for the Radio wrapper. * * @memberof RadioProps */ radioWrapperProps?: any; } /** * **Parity Radio**. * * @see {@link https://beta-parity-react.vercel.app/radio Parity Radio} */ export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>; /** * Props for the RadioGroup component. * * Extends properties from the `div` element. */ export interface RadioGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> { /** * The name of the RadioGroup * * It defines name property for children * * @memberof RadioGroupProps */ name: string; /** * The label of the RadioGroup * * @memberof RadioGroupProps */ label?: string | React.ReactNode; /** * The default value of the RadioGroup if radio is not controlled * * @memberof RadioGroupProps */ defaultValue?: string | number; /** * The default value of the RadioGroup * * @memberof RadioGroupProps */ value?: string | number; /** * The radios of group will be disabled * * @memberof RadioGroupProps */ disabled?: boolean; /** * The radios of group will be generated automatically by data * * @memberof RadioGroupProps */ items?: RadioProps[]; /** * The onChange event of the RadioGroup * * It returns the once of value in radio group * * @param value - the value of changed radio * @memberof RadioGroupProps */ onChange?: (value: string | number) => void; } /** * **Parity Radio**. * * @see {@link https://beta-parity-react.vercel.app/radio Parity Radio} */ export declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>; export interface RadioWrapperProps extends BaseProps { } export declare const RadioWrapper: React.ForwardRefExoticComponent<RadioWrapperProps & React.HTMLAttributes<HTMLLabelElement> & React.RefAttributes<HTMLLabelElement>>; export interface RadioIconProps extends BaseProps { checked: boolean; disabled: boolean; color: string; } export declare const RadioIcon: React.ForwardRefExoticComponent<RadioIconProps & React.HTMLAttributes<HTMLLabelElement> & React.RefAttributes<HTMLLabelElement>>; //# sourceMappingURL=index.d.ts.map