UNPKG

@carbon/react

Version:

React components for the Carbon Design System

37 lines (35 loc) 1.47 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. */ const require_runtime = require("../../_virtual/_rolldown/runtime.js"); const require_index = require("../Button/index.js"); let react = require("react"); react = require_runtime.__toESM(react); let prop_types = require("prop-types"); prop_types = require_runtime.__toESM(prop_types); let react_jsx_runtime = require("react/jsx-runtime"); let _carbon_icons_react = require("@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 = _carbon_icons_react.AddFilled, iconDescription = "Add", ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index.default, { renderIcon, iconDescription, ...props }); TableBatchAction.propTypes = { hasIconOnly: prop_types.default.bool, iconDescription: (props) => { if (props.renderIcon && !props.children && !props.iconDescription) return /* @__PURE__ */ new Error("renderIcon property specified without also providing an iconDescription property."); }, renderIcon: prop_types.default.oneOfType([prop_types.default.func, prop_types.default.object]) }; //#endregion exports.default = TableBatchAction;