1 | import * as React from "react";
|
2 | import { ButtonGroup } from "react-bootstrap";
|
3 | import { Omit } from "../index";
|
4 |
|
5 | declare namespace ToggleButtonGroup {
|
6 | interface BaseProps {
|
7 | |
8 |
|
9 |
|
10 |
|
11 | defaultValue?: any;
|
12 | |
13 |
|
14 |
|
15 |
|
16 | value?: any;
|
17 | }
|
18 |
|
19 | interface RadioProps {
|
20 |
|
21 | name: string;
|
22 | type: "radio";
|
23 | onChange?(value: any): void;
|
24 | }
|
25 |
|
26 | interface CheckboxProps {
|
27 | name?: string | undefined;
|
28 | type: "checkbox";
|
29 | onChange?(values: any[]): void;
|
30 | }
|
31 |
|
32 | export type ToggleButtonGroupProps =
|
33 | & BaseProps
|
34 | & (RadioProps | CheckboxProps)
|
35 | & Omit<ButtonGroup.ButtonGroupProps, "onChange">
|
36 | & Omit<React.HTMLProps<ToggleButtonGroup>, "defaultValue" | "type" | "value" | "onChange">;
|
37 | }
|
38 | declare class ToggleButtonGroup extends React.Component<ToggleButtonGroup.ToggleButtonGroupProps> {}
|
39 | export = ToggleButtonGroup;
|