ResourceList.tsx22 lines · main
| 1 | import { forwardRef, HTMLAttributes, ReactNode } from 'react' |
| 2 | import { Card } from 'ui' |
| 3 | |
| 4 | export interface ResourceListProps extends HTMLAttributes<HTMLDivElement> { |
| 5 | children?: ReactNode |
| 6 | } |
| 7 | |
| 8 | export const ResourceList = forwardRef<HTMLDivElement, ResourceListProps>( |
| 9 | ({ children, className, ...props }, ref) => { |
| 10 | return ( |
| 11 | <Card |
| 12 | ref={ref} |
| 13 | className={['overflow-hidden', className].filter(Boolean).join(' ')} |
| 14 | {...props} |
| 15 | > |
| 16 | {children} |
| 17 | </Card> |
| 18 | ) |
| 19 | } |
| 20 | ) |
| 21 | |
| 22 | ResourceList.displayName = 'ResourceList' |