lune-ui-lib
Version:
Lune UI Components Library
30 lines (29 loc) • 1.19 kB
TypeScript
import type { SxProps } from '@mui/material';
import { MenuItemProps } from '@mui/material/MenuItem';
import * as React from 'react';
import { FC } from 'react';
export declare const DropdownItem: FC<MenuItemProps>;
/**
* Dropdown component
* @param buttonLabel - label shown on the button
* @param children - list of `DropdownItem` elements or other react nodes, which will be rendered as dropdown items
* @param active - sets button's active state; false by default
* @param closeOnClick - if set to false, prevents dropdown from closing on any item click; true by default
* @param compact - compact version of the dropdown button; false by default
* @param menuAutoWidth - forcing the dropdown's width to match its items' width ; false by default
* @param sx - custom style that applies to dropdown button
* @param labelSx - custom style that applies to the button label
* @constructor
*/
declare const Dropdown: FC<{
buttonLabel: string;
active?: boolean;
closeOnClick?: boolean;
menuAutoWidth?: boolean;
compact?: boolean;
sx?: SxProps;
labelSx?: SxProps;
dataTestId?: string;
children: React.ReactNode;
}>;
export default Dropdown;