@wordpress/components
Version:
UI components for WordPress.
1 lines • 1.34 kB
Source Map (JSON)
{"version":3,"file":"component.mjs","names":[],"sources":["../../../src/card/card-divider/component.tsx"],"sourcesContent":["import type { ForwardedRef } from 'react';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport type { DividerProps } from '../../divider';\nimport { Divider } from '../../divider';\nimport { useCardDivider } from './hook';\n\nfunction UnconnectedCardDivider(\n\tprops: WordPressComponentProps< DividerProps, 'hr', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst dividerProps = useCardDivider( props );\n\n\treturn <Divider { ...dividerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `CardDivider` renders an optional divider within a `Card`.\n * It is typically used to divide multiple `CardBody` components from each other.\n *\n * ```jsx\n * import { Card, CardBody, CardDivider } from `@wordpress/components`;\n *\n * <Card>\n * <CardBody>...</CardBody>\n * <CardDivider />\n * <CardBody>...</CardBody>\n * </Card>\n * ```\n */\nexport const CardDivider = contextConnect(\n\tUnconnectedCardDivider,\n\t'CardDivider'\n);\n\nexport default CardDivider;\n"],"mappings":";;;;;AAOA,SAAS,uBACR,OACA,cACC;CACD,MAAM,eAAe,eAAgB,KAAM;CAE3C,OAAO,oBAAC,SAAD;EAAS,GAAK;EAAe,KAAM;CAAgB,CAAA;AAC3D;;;;;;;;;;;;;;;AAgBA,MAAa,cAAc,eAC1B,wBACA,aACD"}