UNPKG

@carbon/react

Version:

React components for the Carbon Design System

35 lines (33 loc) 1.03 kB
/** * Copyright IBM Corp. 2016, 2026 * * 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 OverflowMenuItem_default from "../OverflowMenuItem/index.js"; import { forwardRef } from "react"; import PropTypes from "prop-types"; import { jsx } from "react/jsx-runtime"; //#region src/components/DataTable/TableToolbarAction.tsx /** * Copyright IBM Corp. 2016, 2025 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ const TableToolbarAction = forwardRef((props, ref) => { const { children, ...rest } = props; return /* @__PURE__ */ jsx(OverflowMenuItem_default, { ref, itemText: children, ...rest }); }); TableToolbarAction.displayName = "TableToolbarAction"; TableToolbarAction.propTypes = { children: PropTypes.node, className: PropTypes.string, onClick: PropTypes.func.isRequired }; //#endregion export { TableToolbarAction as default };