@wordpress/components
Version:
UI components for WordPress.
43 lines (39 loc) • 1.12 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.CardDivider = void 0;
var _context = require("../../context");
var _divider = require("../../divider");
var _hook = require("./hook");
var _jsxRuntime = require("react/jsx-runtime");
/**
* External dependencies
*/
/**
* Internal dependencies
*/
function UnconnectedCardDivider(props, forwardedRef) {
const dividerProps = (0, _hook.useCardDivider)(props);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_divider.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 = exports.CardDivider = (0, _context.contextConnect)(UnconnectedCardDivider, 'CardDivider');
var _default = exports.default = CardDivider;
//# sourceMappingURL=component.js.map