Function
CardContainer
({
className,
onClick,
children,
...props
}: React.ComponentPropsWithoutRef<'div'> & {
onClick?: () => void;
})
Source from the content-addressed store, hash-verified
| 94 | } |
| 95 | |
| 96 | export function CardContainer({ |
| 97 | className, |
| 98 | onClick, |
| 99 | children, |
| 100 | ...props |
| 101 | }: React.ComponentPropsWithoutRef<'div'> & { |
| 102 | onClick?: () => void; |
| 103 | }) { |
| 104 | return ( |
| 105 | <div |
| 106 | role="button" |
| 107 | tabIndex={0} |
| 108 | onKeyDown={(e) => { |
| 109 | if (e.key === 'Enter' || e.key === ' ') { |
| 110 | e.preventDefault(); |
| 111 | onClick?.(); |
| 112 | } |
| 113 | }} |
| 114 | {...props} |
| 115 | onClick={onClick} |
| 116 | className={cn( |
| 117 | 'group border relative rounded-md h-[92px] overflow-clip cursor-pointer transition-colors text-sm', |
| 118 | className, |
| 119 | )} |
| 120 | > |
| 121 | <div className="px-4 py-3 h-full flex flex-col justify-between">{children}</div> |
| 122 | </div> |
| 123 | ); |
| 124 | } |
| 125 | |
| 126 | type SrcbookCardPropsType = { |
| 127 | title: string; |
Callers
nothing calls this directly
Tested by
no test coverage detected