import { clsx } from 'clsx'; import { forwardRef } from 'react'; import type { CardContainerProps } from './CardContainer.types'; /** * A bounded surface that groups related content. It has no slots of its own: children are stacked * with no gap between them. For a card with a title and actions, use `CardWidget`. */ const CardContainer = forwardRef( ( { spotlight, padding = 'md', interactive = false, children, as: Element = 'div', className, ...props }, ref, ) => { return ( } className={clsx( 'wds-card-container', spotlight && `wds-card-container--${spotlight}`, padding === 'none' && 'wds-card-container--padding-none', interactive && 'wds-card-container--interactive', className, )} {...props} > {children} {spotlight === 'inactive' && ( )} ); }, ); CardContainer.displayName = 'CardContainer'; export default CardContainer;