ReportStickyNav.tsx 635 B

1234567891011121314151617181920
  1. import { PropsWithChildren } from 'react'
  2. import { cn } from 'ui'
  3. const ReportStickyNav = ({
  4. content,
  5. children,
  6. className,
  7. }: PropsWithChildren<{ className?: string; content: React.ReactNode }>) => {
  8. return (
  9. <section className={cn('relative flex flex-col gap-4 pt-16 -mt-2', className)}>
  10. <div className="absolute inset-0 z-40 pointer-events-none flex flex-col gap-4">
  11. <div className="sticky top-0 py-4 mb-4 flex items-center gap-2 pointer-events-auto dark:bg-background-200 bg-background">
  12. {content}
  13. </div>
  14. </div>
  15. {children}
  16. </section>
  17. )
  18. }
  19. export default ReportStickyNav