@veracity/vui
Version:
Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.
50 lines (49 loc) • 1.92 kB
TypeScript
import { ChangeEventHandler, FocusEventHandler } from "../utils/types.js";
import "../utils/index.js";
import { ThemingProps } from "../theme/types.js";
import "../theme/index.js";
import { SystemProps } from "../system/system.js";
import "../system/index.js";
import { IconProp } from "../icon/icon.types.js";
import "../icon/index.js";
import { HTMLAttributes } from "react";
//#region src/radio/radio.types.d.ts
type RadioProps = SystemProps & ThemingProps<'Radio'> & {
/** Provides value to radio in controlled mode. */
checked?: boolean;
/** Deprecated. Please use variant instead. @deprecated */
colorScheme?: 'blue' | 'prussian';
/** Disables radio and related elements with the right styling. */
disabled?: boolean;
/** Makes the radio non-interactive while keeping normal styling. Value cannot be changed by the user. */
readOnly?: boolean;
/** Icon used when not checked. @default uiRadioSelected */
icon?: IconProp;
/** Icon used when checked. @default uiRadioUnselected */
iconChecked?: IconProp;
/** Props object passed to the inner input element. */
inputProps?: HTMLAttributes<HTMLInputElement>;
/** Ref passed to the inner input element. */
inputRef?: React.MutableRefObject<HTMLInputElement | null> | null;
/** Socket for the text next to the item. */
label?: string;
/** Passed to the inner input. */
name?: string;
/** Passed to the inner input. */
onBlur?: FocusEventHandler;
/** Passed to the inner input. */
onChange?: ChangeEventHandler;
/** Passed to the inner input. */
onFocus?: FocusEventHandler;
/** Passed to the inner input. */
required?: boolean;
/** Passed to the inner input. */
value?: number | string;
};
type RadioStyleProps = {
/** Styles the icon when any part of the radio is hovered. */
controlHoverColor: string;
};
//#endregion
export { RadioProps, RadioStyleProps };
//# sourceMappingURL=radio.types.d.ts.map