Skip to content
Merged
Prev Previous commit
Next Next commit
fix header animation
  • Loading branch information
SaxonF committed Jun 27, 2023
commit af387c57664a197e29cdd38329fe6e794f1a6ce7
17 changes: 13 additions & 4 deletions packages/edit-site/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,20 @@ export default function Layout() {
ariaLabel={ __( 'Editor top bar' ) }
as={ motion.div }
variants={ {
isDistractionFree: { opacity: 0 },
isDistractionFreeHovering: { opacity: 1 },
view: { opacity: 1 },
edit: { opacity: 1 },
isDistractionFree: { opacity: 0, y: 0 },
isDistractionFreeHovering: {
opacity: 1,
y: 0,
},
view: { opacity: 1, y: '-100%' },
edit: { opacity: 1, y: 0 },
} }
exit="view"
initial={
isDistractionFree
? 'isDistractionFree'
: 'view'
}
transition={ {
type: 'tween',
duration: disableMotion ? 0 : 0.2,
Expand Down