UNPKG

1.7 kBTypeScriptView Raw
1import * as React from "react";
2import type { ControlProps } from "./controlProps";
3/**
4 * Switch component props.
5 */
6export interface SwitchProps extends ControlProps {
7 /**
8 * Text to display inside the switch indicator when checked.
9 * If `innerLabel` is provided and this prop is omitted, then `innerLabel`
10 * will be used for both states.
11 *
12 * @default innerLabel
13 */
14 innerLabelChecked?: string;
15 /**
16 * Text to display inside the switch indicator when unchecked.
17 */
18 innerLabel?: string;
19}
20/**
21 * Switch component.
22 *
23 * @see https://blueprintjs.com/docs/#core/components/switch
24 */
25export declare const Switch: React.FC<SwitchProps>;
26/**
27 * Radio component props.
28 */
29export type RadioProps = ControlProps;
30/**
31 * Radio component.
32 *
33 * @see https://blueprintjs.com/docs/#core/components/radio
34 */
35export declare const Radio: React.FC<RadioProps>;
36/**
37 * Checkbox component props.
38 */
39export interface CheckboxProps extends ControlProps {
40 /** Whether this checkbox is initially indeterminate (uncontrolled mode). */
41 defaultIndeterminate?: boolean;
42 /**
43 * Whether this checkbox is indeterminate, or "partially checked."
44 * The checkbox will appear with a small dash instead of a tick to indicate that the value
45 * is not exactly true or false.
46 *
47 * Note that this prop takes precendence over `checked`: if a checkbox is marked both
48 * `checked` and `indeterminate` via props, it will appear as indeterminate in the DOM.
49 */
50 indeterminate?: boolean;
51}
52/**
53 * Checkbox component.
54 *
55 * @see https://blueprintjs.com/docs/#core/components/checkbox
56 */
57export declare const Checkbox: React.FC<CheckboxProps>;