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