UNPKG

638 BTypeScriptView Raw
1import * as React from 'react';
2import { StandardProps } from '..';
3import { SwitchBaseProps, SwitchBaseClassKey } from '../internal/SwitchBase';
4
5export interface SwitchProps
6 extends StandardProps<SwitchBaseProps, SwitchClassKey, 'checkedIcon' | 'color' | 'icon'> {
7 checkedIcon?: React.ReactNode;
8 color?: 'primary' | 'secondary' | 'default';
9 icon?: React.ReactNode;
10 size?: 'small' | 'medium';
11}
12
13export type SwitchClassKey =
14 | SwitchBaseClassKey
15 | 'switchBase'
16 | 'colorPrimary'
17 | 'colorSecondary'
18 | 'sizeSmall'
19 | 'thumb'
20 | 'track';
21
22declare const Switch: React.ComponentType<SwitchProps>;
23
24export default Switch;