UNPKG

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