UNPKG

@gechiui/components

Version:
40 lines (36 loc) 1.22 kB
import _extends from "@babel/runtime/helpers/esm/extends"; import { createElement } from "@gechiui/element"; /** * Internal dependencies */ import { contextConnect } from '../../ui/context'; import { Divider } from '../../divider'; import { useCardDivider } from './hook'; /** * @param {import('../../ui/context').GeChiUIComponentProps<import('../../divider').DividerProps, 'hr', false>} props * @param {import('react').Ref<any>} forwardedRef */ function CardDivider(props, forwardedRef) { const dividerProps = useCardDivider(props); return createElement(Divider, _extends({}, dividerProps, { ref: forwardedRef })); } /** * `CardDivider` renders an optional divider within a `Card`. * It is typically used to divide multiple `CardBody` components from each other. * * @example * ```jsx * import { Card, CardBody, CardDivider } from `@gechiui/components`; * * <Card> * <CardBody>...</CardBody> * <CardDivider /> * <CardBody>...</CardBody> * </Card> * ``` */ const ConnectedCardDivider = contextConnect(CardDivider, 'CardDivider'); export default ConnectedCardDivider; //# sourceMappingURL=component.js.map