@chief-editor/ui
Version:
UI Component for chief editor
17 lines (16 loc) • 897 B
TypeScript
import { UnionOmit } from '@co-hooks/util';
import React, { ChangeEvent, FocusEventHandler, HTMLAttributes } from 'react';
import { InputCommonAttributes } from '../input-wrapper/const';
export interface ICheckWrapper<T extends HTMLElement = HTMLElement> {
type: 'radio' | 'checkbox';
disabled?: boolean;
checked?: boolean;
checkedWave?: boolean;
onValueChange?: (checked: boolean) => void;
onFocus?: FocusEventHandler<HTMLInputElement>;
onBlur?: FocusEventHandler<HTMLInputElement>;
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
waveElementRef?: React.MutableRefObject<T | null>;
}
export declare type ICheckWrapperProps<T extends HTMLElement = HTMLElement> = UnionOmit<ICheckWrapper<T>, HTMLAttributes<HTMLLabelElement> & InputCommonAttributes>;
export declare function CheckWrapper<T extends HTMLElement>(props: ICheckWrapperProps<T>): JSX.Element;