UNPKG

@wordpress/components

Version:
41 lines (40 loc) • 1.33 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); let ______context_index_ts = require("../../context/index.cjs"); let ______scrollable_index_ts = require("../../scrollable/index.cjs"); let ______view_index_ts = require("../../view/index.cjs"); let __hook_ts = require("./hook.cjs"); let react_jsx_runtime = require("react/jsx-runtime"); // packages/components/src/card/card-body/component.tsx function UnconnectedCardBody(props, forwardedRef) { const { isScrollable, ...otherProps } = (0, __hook_ts.useCardBody)(props); if (isScrollable) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(______scrollable_index_ts.Scrollable, { ...otherProps, ref: forwardedRef }); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(______view_index_ts.View, { ...otherProps, ref: forwardedRef }); } /** * `CardBody` renders an optional content area for a `Card`. * Multiple `CardBody` components can be used within `Card` if needed. * * ```jsx * import { Card, CardBody } from `@wordpress/components`; * * <Card> * <CardBody> * ... * </CardBody> * </Card> * ``` */ const CardBody = (0, ______context_index_ts.contextConnect)(UnconnectedCardBody, "CardBody"); exports.CardBody = CardBody; exports.default = CardBody; //# sourceMappingURL=component.cjs.map