UNPKG

@carbon/ibm-products

Version:
47 lines (45 loc) 1.38 kB
/** * Copyright IBM Corp. 2020, 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 { __toESM } from "../../../_virtual/_rolldown/runtime.js"; import { require_classnames } from "../../../node_modules/classnames/index.js"; import { pkg } from "../../../settings.js"; import React, { forwardRef } from "react"; import PropTypes from "prop-types"; //#region src/components/Card/next/CardBody.tsx /** * Copyright IBM Corp. 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. */ var import_classnames = /* @__PURE__ */ __toESM(require_classnames()); const componentName = "CardBody"; const blockClass = `${pkg.prefix}--card-next__body`; /** * CardBody component - Body section of the card for free-form content */ const CardBody = forwardRef(({ className, children, ...rest }, ref) => { const bodyClasses = (0, import_classnames.default)(blockClass, className); return /* @__PURE__ */ React.createElement("div", { ...rest, ref, className: bodyClasses }, children); }); CardBody.displayName = componentName; CardBody.propTypes = { /** * Body content */ children: PropTypes.node, /** * Additional CSS class names */ className: PropTypes.string }; //#endregion export { CardBody };