Files
kemal.earthandClaude Opus 5 839c7a9cbb feat(studio): full-screen pricing panel variants (#49640)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Incorporating the parent PR.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 11:53:16 +02:00

38 lines
946 B
TypeScript

import type { Variants } from 'framer-motion'
const CARD_VARIANTS: Variants = {
hidden: { opacity: 0, y: 8 },
visible: { opacity: 1, y: 0, transition: { duration: 0.3, ease: 'easeOut' } },
}
const STAGGER_AFTER_CONTAINER = 0.2
const STAGGER_BETWEEN_CARDS = 0.08
export interface PlanCardsEntryAnimation {
container: { variants?: Variants; initial?: string; animate?: string }
card: Variants | undefined
}
export function getPlanCardsEntryAnimation(
entryDelay: number | undefined
): PlanCardsEntryAnimation {
if (entryDelay === undefined) return { container: {}, card: undefined }
return {
container: {
variants: {
hidden: {},
visible: {
transition: {
delayChildren: entryDelay + STAGGER_AFTER_CONTAINER,
staggerChildren: STAGGER_BETWEEN_CARDS,
},
},
},
initial: 'hidden',
animate: 'visible',
},
card: CARD_VARIANTS,
}
}