@unicity/design-system
Version:
A comprehensive React component library built on Material-UI with advanced theming capabilities including neumorphism design support
63 lines • 1.51 kB
TypeScript
import React from 'react';
import { RadioProps as MuiRadioProps } from '@mui/material';
export interface RadioOption {
value: string;
label: string;
disabled?: boolean;
}
export interface RadioProps extends Omit<MuiRadioProps, 'onChange'> {
/**
* The label for the radio
*/
label?: string;
/**
* Array of radio options for RadioGroup
*/
options?: RadioOption[];
/**
* The current value
*/
value?: string;
/**
* Callback fired when a radio is selected
*/
onChange?: (value: string, event: React.ChangeEvent<HTMLInputElement>) => void;
/**
* Whether the radio is disabled
*/
disabled?: boolean;
/**
* Whether the field has an error
*/
error?: boolean;
/**
* Helper text to display below the radio group
*/
helperText?: string;
/**
* The size of the radio
*/
size?: 'small' | 'medium';
/**
* The color of the radio
*/
color?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
/**
* Whether the radio group is required
*/
required?: boolean;
/**
* Position of the label relative to the radio
*/
labelPlacement?: 'start' | 'end' | 'top' | 'bottom';
/**
* The layout direction of the radio group
*/
row?: boolean;
/**
* Label for the radio group
*/
groupLabel?: string;
}
export declare const Radio: React.FC<RadioProps>;
//# sourceMappingURL=Radio.d.ts.map