UNPKG

1.23 kBTypeScriptView Raw
1import * as React from 'react';
2import { ButtonType } from '@restart/ui/Button';
3import { DropdownProps } from './Dropdown';
4import { PropsFromToggle } from './DropdownToggle';
5import { BsPrefixProps } from './helpers';
6export interface SplitButtonProps extends Omit<DropdownProps, 'title'>, PropsFromToggle, BsPrefixProps {
7 menuRole?: string;
8 renderMenuOnMount?: boolean;
9 rootCloseEvent?: 'click' | 'mousedown';
10 target?: string;
11 title: React.ReactNode;
12 toggleLabel?: string;
13 type?: ButtonType;
14 flip?: boolean;
15}
16/**
17 * A convenience component for simple or general use split button dropdowns. Renders a
18 * `ButtonGroup` containing a `Button` and a `Button` toggle for the `Dropdown`. All `children`
19 * are passed directly to the default `Dropdown.Menu`. This component accepts all of [`Dropdown`'s
20 * props](#dropdown-props).
21 *
22 * _All unknown props are passed through to the `Dropdown` component._
23 * The Button `variant`, `size` and `bsPrefix` props are passed to the button and toggle,
24 * and menu-related props are passed to the `Dropdown.Menu`
25 */
26declare const SplitButton: React.ForwardRefExoticComponent<SplitButtonProps & React.RefAttributes<HTMLElement>>;
27export default SplitButton;