UNPKG

@carbon/react

Version:

React components for the Carbon Design System

32 lines (31 loc) 1.2 kB
/** * Copyright IBM Corp. 2016, 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 from 'react'; export declare const translationIds: { readonly 'close.menu': "close.menu"; readonly 'open.menu': "open.menu"; }; export type TranslationKey = keyof typeof translationIds; export interface ListBoxTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> { /** * Specify whether the menu is currently open, which will influence the * direction of the menu icon */ isOpen: boolean; /** * i18n hook used to provide the appropriate description for the given menu * icon. This function takes in an id defined in `translationIds` and should * return a string message for that given message id. */ translateWithId?: (id: TranslationKey) => string; } /** * `ListBoxTrigger` is used to orient the icon up or down depending on the * state of the menu for a given `ListBox` */ declare const ListBoxTrigger: React.ForwardRefExoticComponent<ListBoxTriggerProps & React.RefAttributes<HTMLButtonElement>>; export default ListBoxTrigger;