UNPKG

@douyinfe/semi-ui

Version:

A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.

59 lines (58 loc) 2.28 kB
import React from 'react'; import PropTypes from 'prop-types'; import RadioInnerFoundation, { RadioChangeEvent, RadioInnerAdapter } from '@douyinfe/semi-foundation/lib/cjs/radio/radioInnerFoundation'; import BaseComponent, { BaseProps } from '../_base/baseComponent'; export type RadioInnerMode = 'advanced' | ''; export interface RadioInnerProps extends BaseProps { checked?: boolean; disabled?: boolean; isButtonRadio?: boolean; onChange?: (e: RadioChangeEvent) => void; mode?: RadioInnerMode; autoFocus?: boolean; name?: string; prefixCls?: string; ref?: React.MutableRefObject<RadioInner> | ((instance: RadioInner) => void); isPureCardRadioGroup?: boolean; addonId?: string; extraId?: string; 'aria-label'?: React.AriaAttributes['aria-label']; focusInner?: boolean; onInputFocus?: (e: any) => void; onInputBlur?: (e: any) => void; preventScroll?: boolean; } interface RadioInnerState { checked?: boolean; } declare class RadioInner extends BaseComponent<RadioInnerProps, RadioInnerState> { static contextType: React.Context<import("./context").RadioContextValue>; static propTypes: { checked: PropTypes.Requireable<boolean>; disabled: PropTypes.Requireable<boolean>; isButtonRadio: PropTypes.Requireable<boolean>; onChange: PropTypes.Requireable<(...args: any[]) => any>; mode: PropTypes.Requireable<string>; 'aria-label': PropTypes.Requireable<string>; focusInner: PropTypes.Requireable<boolean>; onInputFocus: PropTypes.Requireable<(...args: any[]) => any>; onInputBlur: PropTypes.Requireable<(...args: any[]) => any>; preventScroll: PropTypes.Requireable<boolean>; }; static defaultProps: { onChange: (...args: any[]) => void; isButtonRadio: boolean; }; inputEntity: HTMLInputElement; foundation: RadioInnerFoundation; constructor(props: RadioInnerProps); get adapter(): RadioInnerAdapter; componentDidMount(): void; componentDidUpdate(prevProps: RadioInnerProps): void; componentWillUnmount(): void; blur(): void; focus(): void; onChange(e: React.ChangeEvent<HTMLInputElement>): void; render(): React.JSX.Element; } export default RadioInner;