Skip to content

Commit

Permalink
use ! isMobileViewport instead of isLargeViewport
Browse files Browse the repository at this point in the history
  • Loading branch information
richtabor committed Aug 5, 2024
1 parent a64c5ab commit 6ef5393
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/interface/src/components/interface-skeleton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ function InterfaceSkeleton(
const [ secondarySidebarResizeListener, secondarySidebarSize ] =
useResizeObserver();
const isMobileViewport = useViewportMatch( 'medium', '<' );
const isLargeViewport = useViewportMatch( 'medium' );
const disableMotion = useReducedMotion();
const defaultTransition = {
type: 'tween',
Expand Down Expand Up @@ -144,22 +143,22 @@ function InterfaceSkeleton(
className="interface-interface-skeleton__header"
aria-label={ mergedLabels.header }
initial={
isDistractionFree && isLargeViewport
isDistractionFree && ! isMobileViewport
? 'distractionFreeHidden'
: 'hidden'
}
whileHover={
isDistractionFree && isLargeViewport
isDistractionFree && ! isMobileViewport
? 'distractionFreeHover'
: 'visible'
}
animate={
isDistractionFree && isLargeViewport
isDistractionFree && ! isMobileViewport
? 'distractionFreeDisabled'
: 'visible'
}
exit={
isDistractionFree && isLargeViewport
isDistractionFree && ! isMobileViewport
? 'distractionFreeHidden'
: 'hidden'
}
Expand Down

0 comments on commit 6ef5393

Please sign in to comment.