UNPKG

@wordpress/components

Version:
30 lines (29 loc) 800 B
// packages/components/src/card/card-body/component.tsx import { contextConnect } from "../../context"; import { Scrollable } from "../../scrollable"; import { View } from "../../view"; import { useCardBody } from "./hook"; import { jsx as _jsx } from "react/jsx-runtime"; function UnconnectedCardBody(props, forwardedRef) { const { isScrollable, ...otherProps } = useCardBody(props); if (isScrollable) { return /* @__PURE__ */ _jsx(Scrollable, { ...otherProps, ref: forwardedRef }); } return /* @__PURE__ */ _jsx(View, { ...otherProps, ref: forwardedRef }); } var CardBody = contextConnect(UnconnectedCardBody, "CardBody"); var component_default = CardBody; export { CardBody, component_default as default }; //# sourceMappingURL=component.js.map