Skip to content

Commit

Permalink
Merge pull request #2228 from graphcommerce-org/fix/inert-type-correc…
Browse files Browse the repository at this point in the history
…tion

chore: apply correct type for the inert property
  • Loading branch information
paales authored Mar 25, 2024
2 parents c1c55aa + 0c0cacb commit 62ca383
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .changeset/rotten-rules-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@graphcommerce/framer-next-pages": patch
"@graphcommerce/next-ui": patch
---

apply correct type for the inert property
4 changes: 2 additions & 2 deletions packages/framer-next-pages/components/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { PageItem } from '../types'

declare module 'react' {
interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
inert?: 'true'
inert?: boolean | undefined
}
}

Expand Down Expand Up @@ -42,7 +42,7 @@ export function Page(props: PageProps) {
<m.div
layoutScroll
style={{ position, top, zIndex, minHeight: dvh(100), left: 0, right: 0 }}
inert={!active ? 'true' : undefined}
inert={!active ? true : undefined}
data-nosnippet={!active ? true : undefined}
aria-hidden={!active ? true : undefined}
>
Expand Down
4 changes: 2 additions & 2 deletions packages/next-ui/Overlay/components/OverlayBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ export function OverlayBase(incomingProps: LayoutOverlayBaseProps) {
return (
<>
<MotionDiv
inert={active ? undefined : 'true'}
inert={active ? undefined : true}
className={classes.backdrop}
style={{ opacity: positions.open.visible }}
sx={[
Expand All @@ -385,7 +385,7 @@ export function OverlayBase(incomingProps: LayoutOverlayBaseProps) {
]}
/>
<Scroller
inert={active ? undefined : 'true'}
inert={active ? undefined : true}
className={`${classes.scroller} ${className ?? ''}`}
grid={false}
onClick={onClickAway}
Expand Down

0 comments on commit 62ca383

Please sign in to comment.