import { forwardRef, Ref } from 'react'; import { CardImageComponent, CardImageProps } from './CardImage.types'; import { useComponentTheme } from '../../themes/theme.context'; import { useCardContext } from '../Card.context'; import { usePropId } from '../../utils/usePropId'; import React from 'react'; const CardImage: CardImageComponent = forwardRef( (props: CardImageProps, ref?: Ref) => { const theme = useComponentTheme('Card'); const { caption, children, src, alt = '', className = '', mode = 'light', ...additionalProps } = props; const { radius } = useCardContext(); const id = usePropId(props.id); const classes = theme.image({ radius }); return ( {alt} ); } ); CardImage.displayName = 'CardImage'; export { CardImage };