@carbon/ibm-products
Version:
Carbon for IBM Products
42 lines (41 loc) • 1.38 kB
TypeScript
/**
* Copyright IBM Corp. 2020, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React, { ComponentProps, ReactNode } from 'react';
export interface ComboButtonProps extends ComponentProps<'div'> {
/** Provide the contents of the `ComboButton` */
children?: ReactNode;
/** Provide an optional class to be applied to the containing node */
className?: string;
/** Provide the [props of the `OverflowMenu`](https://react.carbondesignsystem.com/?path=/docs/overflowmenu) */
overflowMenu: {
/**
* The event handler for the `click` event.
*/
onClick?(): void;
/**
* Function called when menu is closed
*/
onClose?(): void;
/**
* The event handler for the `focus` event.
*/
onFocus?(): void;
/**
* The event handler for the `keydown` event.
*/
onKeyDown?(): void;
/**
* Function called when menu is opened
*/
onOpen?(): void;
};
}
/**
* The combo button consolidates similar actions, while exposing the most commonly used one.
*/
declare const ComboButton: React.ForwardRefExoticComponent<Omit<ComboButtonProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
export { ComboButton };