Skip to content

Commit

Permalink
feat: add ability for cookies banner to overlay everything else (#594)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsladerman authored May 17, 2024
1 parent 0b189b3 commit 41fed36
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/Layer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ function LayerRef(
{
position,
animation = 'slide',
modal = false,
margin,
children,
onClickOutside,
Expand All @@ -161,6 +162,7 @@ function LayerRef(
open: boolean
position: LayerPositionType
animation?: AnimationType
modal?: boolean
margin?: MarginType
onClose?: () => void | null | undefined
onCloseComplete?: () => void | null | undefined
Expand Down Expand Up @@ -295,7 +297,10 @@ function LayerRef(
<AnimatedDiv
className="animated"
ref={finalRef}
style={{ ...styles }}
style={{
...styles,
...(modal ? { zIndex: theme.zIndexes.modal } : {}),
}}
>
{children}
</AnimatedDiv>
Expand Down

0 comments on commit 41fed36

Please sign in to comment.