@massds/mayflower-react
Version:
React versions of Mayflower design system UI components
38 lines (37 loc) • 1.44 kB
TypeScript
/**
* LinkDropdown module.
* @module @massds/mayflower-react/LinkDropdown
* @requires module:@massds/mayflower-assets/scss/01-atoms/button-with-icon
* @requires module:@massds/mayflower-assets/scss/01-atoms/button-search
* @requires module:@massds/mayflower-assets/scss/01-atoms/decorative-link
* @requires module:@massds/mayflower-assets/scss/01-atoms/svg-icons
* @requires module:@massds/mayflower-assets/scss/01-atoms/svg-loc-icons
*/
import React from 'react';
import { ButtonWithIconProps } from '../ButtonWithIcon';
export interface LinkDropdownProps {
/** The props to set up the dropdown button */
dropdownButton?: ButtonWithIconProps;
/** Custom callback on dropdown item selection. */
onItemSelect?(...args: unknown[]): unknown;
/** Custom callback on dropdown button click. */
onButtonClick?(...args: unknown[]): unknown;
/** An array of dropdown link items */
dropdownItems?: {
text?: string;
href?: string;
}[];
}
declare class LinkDropdown extends React.Component<LinkDropdownProps> {
constructor(props: any);
componentDidMount(): void;
componentWillUnmount(): void;
setDropDownButtonRef(node: any): void;
handleSelect: (event: any) => void;
handleClickOutside: (event: any) => void;
handleKeyDown: (event: any) => void;
handleClick: (event: any) => void;
closeDropdown(): void;
render(): any;
}
export default LinkDropdown;