@chief-editor/ui
Version:
UI Component for chief editor
22 lines (21 loc) • 842 B
TypeScript
import { UnionOmit } from '@co-hooks/util';
import { ReactNode } from 'react';
import { ICheckWrapperProps } from '../check-wrapper';
export interface ISwitch {
trueContent?: ReactNode;
falseContent?: ReactNode;
}
declare type OmitCheckWrapperPropKeys = 'type' | 'checkedWave' | 'children' | 'waveElementRef';
export declare type ISwitchProps = UnionOmit<ISwitch, Omit<ICheckWrapperProps, OmitCheckWrapperPropKeys>>;
export declare function Switch(props: ISwitchProps): JSX.Element;
export declare namespace Switch {
var Valued: typeof ValuedSwitch;
}
export declare type IValuedSwitchProps<T> = UnionOmit<{
value?: T;
onValueChange?: (value: T) => void;
trueValue: T;
falseValue: T;
}, Omit<ISwitchProps, 'checked'>>;
export declare function ValuedSwitch<T>(props: IValuedSwitchProps<T>): JSX.Element;
export {};