ResourceList.tsx 549 B

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