UNPKG

1.22 kBTypeScriptView Raw
1import React from 'react';
2import { DropdownProps } from './Dropdown';
3import { PropsFromToggle } from './DropdownToggle';
4import { AlignType } from './DropdownMenu';
5import { BsPrefixPropsWithChildren, BsPrefixRefForwardingComponent } from './helpers';
6export interface DropdownButtonProps extends DropdownProps, Omit<React.HTMLAttributes<HTMLElement>, 'onSelect' | 'title'>, PropsFromToggle, BsPrefixPropsWithChildren {
7 title: React.ReactNode;
8 menuAlign?: AlignType;
9 menuRole?: string;
10 renderMenuOnMount?: boolean;
11 rootCloseEvent?: 'click' | 'mousedown';
12}
13declare type DropdownButton = BsPrefixRefForwardingComponent<'div', DropdownButtonProps>;
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: DropdownButton;
24export default DropdownButton;