import { css, on, type Handle, type RemixNode } from '@remix-run/ui' import { animateEntrance, animateExit } from '@remix-run/ui/animation' const ease = 'cubic-bezier(0.26, 0.02, 0.23, 0.94)' function OverlapExample(handle: Handle<{ state: boolean }>) { let shouldAnimate = false handle.queueTask(() => { shouldAnimate = true }) return () => { let { state } = handle.props let animationMix = [ animateExit({ opacity: 0, transform: 'scale(0.8)', duration: 300, easing: ease, }), ] if (shouldAnimate) { animationMix.unshift( animateEntrance({ opacity: 0, transform: 'scale(0.6)', duration: 300, easing: ease, }), ) } return (
*': { gridArea: '1 / 1' } })]} > {state ? (
) : (
)}
) } } function WaitExample(handle: Handle<{ state: boolean }>) { let shouldAnimate = false handle.queueTask(() => { shouldAnimate = true }) return () => { let { state } = handle.props let animationMix = [ animateExit({ opacity: 0, transform: 'scale(0.8)', duration: 300, easing: ease, }), ] if (shouldAnimate) { animationMix.unshift( animateEntrance({ opacity: 0, transform: 'scale(0.6)', duration: 300, easing: ease, delay: 300, }), ) } return (
*': { gridArea: '1 / 1' } })]} > {state ? (
) : (
)}
) } } export function SharedLayout(handle: Handle) { let state = true return () => (
) } function Circle(handle: Handle<{ filled?: boolean; children: RemixNode }>) { return () => (
{handle.props.children}
) } function FilledIcon() { return () => ( ) } function OutlineIcon() { return () => ( ) }