mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
* new homepage logos marquee * add products claim * logos spacing * dashboard table editor demo * dashboard table editor demo * dashboard recordings * rls policies * update hp frameworks * add dataAPIs to homepage bento * tweet section update * padding * hp products update * new customer stories hp section * height * finish homepage details * update logos * fix database visual * improve functions visual ux * animate data-apis visual * realtime visual update * reduce-motion and update chatbase logo * lighter heading paragraph * improve video tabs components * add priority to offsetted images * video plays inline * fix mobile tweets spacing * smoll * load video slightly before the component enters the viewport * fix product pointer-events * theme based and light weight dashboard video * testimonials margin * remove yellow tint from light mode recordings * fix vitest window-matchMedia error * fix vitest window-matchMedia error * fix url type * remove tweet
24 lines
652 B
TypeScript
24 lines
652 B
TypeScript
export const DEFAULT_EASE = [0.24, 0.25, 0.05, 1]
|
|
export const DEFAULT_DURATION = 0.4
|
|
export const DEFAULT_DELAY = 0
|
|
export const DEFAULT_TRANSITION = { ease: DEFAULT_EASE, duration: DEFAULT_DURATION }
|
|
export const EASE_IN = [1, 0.05, 0, 0]
|
|
export const EASE_OUT = [0, 0, 0.05, 1]
|
|
|
|
interface AnimationProps {
|
|
delay?: number
|
|
duration?: number
|
|
ease?: number
|
|
}
|
|
|
|
export const INITIAL_BOTTOM = { opacity: 0, y: 20 }
|
|
export const getAnimation = ({ delay, duration, ease }: AnimationProps) => ({
|
|
opacity: 1,
|
|
y: 0,
|
|
transition: {
|
|
delay: delay ?? DEFAULT_DELAY,
|
|
ease: ease ?? DEFAULT_EASE,
|
|
duration: duration ?? DEFAULT_DURATION,
|
|
},
|
|
})
|