@wordpress/components
Version:
UI components for WordPress.
1 lines • 1.2 kB
Source Map (JSON)
{"version":3,"file":"component.mjs","names":[],"sources":["../../../src/card/card-footer/component.tsx"],"sourcesContent":["import type { ForwardedRef } from 'react';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { Flex } from '../../flex';\nimport { useCardFooter } from './hook';\nimport type { FooterProps } from '../types';\n\nfunction UnconnectedCardFooter(\n\tprops: WordPressComponentProps< FooterProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst footerProps = useCardFooter( props );\n\n\treturn <Flex { ...footerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `CardFooter` renders an optional footer within a `Card`.\n *\n * ```jsx\n * import { Card, CardBody, CardFooter } from `@wordpress/components`;\n *\n * <Card>\n * \t<CardBody>...</CardBody>\n * \t<CardFooter>...</CardFooter>\n * </Card>\n * ```\n */\nexport const CardFooter = contextConnect( UnconnectedCardFooter, 'CardFooter' );\n\nexport default CardFooter;\n"],"mappings":";;;;;AAOA,SAAS,sBACR,OACA,cACC;CACD,MAAM,cAAc,cAAe,KAAM;CAEzC,OAAO,oBAAC,MAAD;EAAM,GAAK;EAAc,KAAM;CAAgB,CAAA;AACvD;;;;;;;;;;;;;AAcA,MAAa,aAAa,eAAgB,uBAAuB,YAAa"}