UNPKG

@carbon/react

Version:

React components for the Carbon Design System

34 lines (32 loc) 1.18 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 Button_default from "../Button/index.js"; import "react"; import PropTypes from "prop-types"; import { jsx } from "react/jsx-runtime"; import { AddFilled } from "@carbon/icons-react"; //#region src/components/DataTable/TableBatchAction.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 TableBatchAction = ({ renderIcon = AddFilled, iconDescription = "Add", ...props }) => /* @__PURE__ */ jsx(Button_default, { renderIcon, iconDescription, ...props }); TableBatchAction.propTypes = { hasIconOnly: PropTypes.bool, iconDescription: (props) => { if (props.renderIcon && !props.children && !props.iconDescription) return /* @__PURE__ */ new Error("renderIcon property specified without also providing an iconDescription property."); }, renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]) }; //#endregion export { TableBatchAction as default };