UNPKG

1.14 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 flip?: boolean;
13}
14/**
15 * A convenience component for simple or general use dropdowns. Renders a `Button` toggle and all `children`
16 * are passed directly to the default `Dropdown.Menu`. This component accepts all of
17 * [`Dropdown`'s props](#dropdown-props).
18 *
19 * _All unknown props are passed through to the `Dropdown` component._ Only
20 * the Button `variant`, `size` and `bsPrefix` props are passed to the toggle,
21 * along with menu-related props are passed to the `Dropdown.Menu`
22 */
23declare const DropdownButton: BsPrefixRefForwardingComponent<'div', DropdownButtonProps>;
24export default DropdownButton;