@mskcc/carbon-react
Version:
Carbon react components for the MSKCC DSM
40 lines (39 loc) • 1.46 kB
TypeScript
/**
* MSKCC DSM 2021, 2023
*/
import { type ComponentProps } from 'react';
import PropTypes from 'prop-types';
type HeaderMenuButtonBaseProps = Omit<ComponentProps<'button'>, 'title' | 'type'>;
interface HeaderMenuButtonProps extends HeaderMenuButtonBaseProps {
'aria-label'?: string;
'aria-labelledby'?: string;
className?: string;
renderMenuIcon?: JSX.Element;
renderCloseIcon?: JSX.Element;
isActive?: boolean;
isCollapsible?: boolean;
}
declare function HeaderMenuButton({ 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, className: customClassName, renderMenuIcon, renderCloseIcon, isActive, isCollapsible, ...rest }: HeaderMenuButtonProps): JSX.Element;
declare namespace HeaderMenuButton {
var propTypes: {
/**
* Optionally provide a custom class name that is applied to the underlying
* button
*/
className: PropTypes.Requireable<string>;
/**
* Specify whether the menu button is "active".
*/
isActive: PropTypes.Requireable<boolean>;
/**
* Specify whether the menu button is collapsible.
*/
isCollapsible: PropTypes.Requireable<boolean>;
/**
* Optionally provide an onClick handler that is called when the underlying
* button fires it's onclick event
*/
onClick: PropTypes.Requireable<(...args: any[]) => any>;
};
}
export default HeaderMenuButton;