mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 09:25:15 +00:00
24 lines
909 B
TypeScript
24 lines
909 B
TypeScript
|
import { ButtonGroupProps } from './ButtonGroup';
|
||
|
import ToggleButton from './ToggleButton';
|
||
|
import { BsPrefixRefForwardingComponent } from './helpers';
|
||
|
export interface ToggleButtonRadioProps<T> extends Omit<ButtonGroupProps, 'toggle'> {
|
||
|
type?: 'radio';
|
||
|
name: string;
|
||
|
value?: T;
|
||
|
defaultValue?: T;
|
||
|
onChange?: (value: T, event: any) => void;
|
||
|
}
|
||
|
export interface ToggleButtonCheckboxProps<T> extends Omit<ButtonGroupProps, 'toggle'> {
|
||
|
type: 'checkbox';
|
||
|
name?: string;
|
||
|
value?: T[];
|
||
|
defaultValue?: T[];
|
||
|
onChange?: (value: T[]) => void;
|
||
|
}
|
||
|
export declare type ToggleButtonGroupProps<T> = ToggleButtonRadioProps<T> | ToggleButtonCheckboxProps<T>;
|
||
|
declare type ToggleButtonGroup<T> = BsPrefixRefForwardingComponent<'a', ToggleButtonGroupProps<T>> & {
|
||
|
Button: typeof ToggleButton;
|
||
|
};
|
||
|
declare const ToggleButtonGroup: ToggleButtonGroup<any>;
|
||
|
export default ToggleButtonGroup;
|