UNPKG

@wordpress/components

Version:
30 lines (29 loc) • 934 B
import { contextConnect } from "../../context/index.mjs"; import { Divider } from "../../divider/index.mjs"; import { useCardDivider } from "./hook.mjs"; import { jsx } from "react/jsx-runtime"; // packages/components/src/card/card-divider/component.tsx function UnconnectedCardDivider(props, forwardedRef) { const dividerProps = useCardDivider(props); return /* @__PURE__ */ jsx(Divider, { ...dividerProps, ref: forwardedRef }); } /** * `CardDivider` renders an optional divider within a `Card`. * It is typically used to divide multiple `CardBody` components from each other. * * ```jsx * import { Card, CardBody, CardDivider } from `@wordpress/components`; * * <Card> * <CardBody>...</CardBody> * <CardDivider /> * <CardBody>...</CardBody> * </Card> * ``` */ const CardDivider = contextConnect(UnconnectedCardDivider, "CardDivider"); export { CardDivider, CardDivider as default }; //# sourceMappingURL=component.mjs.map