UNPKG

1.12 kBTypeScriptView Raw
1import * as React from 'react';
2import { DropdownProps } from './Dropdown';
3import { PropsFromToggle } from './DropdownToggle';
4import { DropdownMenuVariant } from './DropdownMenu';
5import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
6export interface DropdownButtonProps extends Omit<DropdownProps, 'title'>, PropsFromToggle, BsPrefixProps {
7 title: React.ReactNode;
8 menuRole?: string;
9 renderMenuOnMount?: boolean;
10 rootCloseEvent?: 'click' | 'mousedown';
11 menuVariant?: DropdownMenuVariant;
12}
13/**
14 * A convenience component for simple or general use dropdowns. Renders a `Button` toggle and all `children`
15 * are passed directly to the default `Dropdown.Menu`. This component accepts all of
16 * [`Dropdown`'s props](#dropdown-props).
17 *
18 * _All unknown props are passed through to the `Dropdown` component._ Only
19 * the Button `variant`, `size` and `bsPrefix` props are passed to the toggle,
20 * along with menu-related props are passed to the `Dropdown.Menu`
21 */
22declare const DropdownButton: BsPrefixRefForwardingComponent<'div', DropdownButtonProps>;
23export default DropdownButton;