Skip to content

Commit

Permalink
feat(Banner): add className prop
Browse files Browse the repository at this point in the history
  • Loading branch information
dovalid committed Jul 11, 2024
1 parent 5c0c5c0 commit 8a79cff
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/v2/components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,22 @@ const Headline = ({ title }: HeadlineProps) => (

interface BannerProps extends PropsWithChildren {
offset?: number
className: string
}

const Banner = ({ children, offset = 112 }: BannerProps) => (
const Banner = ({ children, offset = 112, className }: BannerProps) => (
<div
className={cn(
"-z-10 absolute inset-0 overflow-hidden",
`-bottom-[${Math.abs(offset)}px]`
)}
>
<div className="absolute inset-0 bg-[hsl(240_4%_16%)] data-[theme='dark']:bg-[hsl(240_3%_22%)]" />
<div
className={cn(
"absolute inset-0 bg-[hsl(240_4%_16%)] data-[theme='dark']:bg-[hsl(240_3%_22%)]",
className
)}
/>
{children}
</div>
)
Expand Down

0 comments on commit 8a79cff

Please sign in to comment.