1 | import * as React from 'react';
|
2 | import { ButtonGroupProps } from './ButtonGroup';
|
3 | import { BsPrefixRefForwardingComponent } from './helpers';
|
4 | type BaseToggleButtonProps = Omit<ButtonGroupProps, 'toggle' | 'defaultValue' | 'onChange'>;
|
5 | export interface ToggleButtonRadioProps<T> extends BaseToggleButtonProps {
|
6 | type?: 'radio';
|
7 | name: string;
|
8 | value?: T;
|
9 | defaultValue?: T;
|
10 | onChange?: (value: T, event: any) => void;
|
11 | }
|
12 | export interface ToggleButtonCheckboxProps<T> extends BaseToggleButtonProps {
|
13 | type: 'checkbox';
|
14 | name?: string;
|
15 | value?: T[];
|
16 | defaultValue?: T[];
|
17 | onChange?: (value: T[]) => void;
|
18 | }
|
19 | export type ToggleButtonGroupProps<T> = ToggleButtonRadioProps<T> | ToggleButtonCheckboxProps<T>;
|
20 | declare const _default: BsPrefixRefForwardingComponent<"a", ToggleButtonGroupProps<any>> & {
|
21 | Button: React.ForwardRefExoticComponent<import("./ToggleButton").ToggleButtonProps & React.RefAttributes<HTMLLabelElement>>;
|
22 | };
|
23 | export default _default;
|