lucid-ui
Version:
A UI component library from AppNexus.
60 lines (59 loc) • 1.91 kB
TypeScript
import React from 'react';
import { StandardProps, Overwrite } from '../../util/component-types';
export interface IRadioButtonPropsRaw extends StandardProps {
/** Indicates whether the component should appear and act disabled by having
* a "greyed out" palette and ignoring user interactions.
*
* @default false
*/
isDisabled: boolean;
/** Indicates that the component is in the "selected" state when true and in
* the "unselected" state when false.
*
* @default false
*/
isSelected: boolean;
/** Optional name for the input element */
name?: string;
/** Called when the user clicks on the component or when they press the space
* key while the component is in focus, and only called when the component
* is in the unselected state.
*/
onSelect: (isSelected: boolean, { event, props, }: {
event: React.MouseEvent<HTMLInputElement>;
props: IRadioButtonProps;
}) => void;
}
export declare type IRadioButtonProps = Overwrite<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, IRadioButtonPropsRaw>;
export declare const defaultProps: {
isDisabled: boolean;
isSelected: boolean;
onSelect: (...args: any[]) => void;
};
export declare const RadioButton: {
(props: IRadioButtonProps): React.ReactElement;
defaultProps: {
isDisabled: boolean;
isSelected: boolean;
onSelect: (...args: any[]) => void;
};
displayName: string;
peek: {
description: string;
notes: {
overview: string;
intendedUse: string;
technicalRecommendations: string;
};
categories: string[];
};
propTypes: {
className: any;
isDisabled: any;
isSelected: any;
name: any;
onSelect: any;
style: any;
};
};
export default RadioButton;