Files
anthony lio 1a37362821 chore(billing): plan selection styling (#53841)
## Problem

- plan cards on the studio upgrade screen do not match recent plan cards
updates to the pricing page
- add-on illustrations on the pricing page sometimes show the light
image in dark mode
- spend cap bars on the pricing page flash when a user toggles the spend
cap


## Solution

- changes the upgrade screen plan cards to the pricing page design +
shows enterprise as a fourth column
- moves the lifted card style to the current plan of the organization +
gives it a neutral "current plan" badge
- moves the compare plans and pricing faq links below the plan cards +
removes the stagger animation on the cards
- changes the pricing page illustrations to pick the light or dark image
with css because the server render does not know the theme
- changes the spend cap animation to resize the bars instead of
remounting them
2026-11-24 18:04:01 +08:00

14 lines
386 B
TypeScript

export const getLiftedSide = ({
index,
liftedIndex,
}: {
index: number
liftedIndex: number
}): 'left' | 'right' | undefined => {
// findIndex gives -1 when no card is lifted, so index 0 must not count as its neighbor
if (liftedIndex === -1) return undefined
if (index === liftedIndex - 1) return 'right'
if (index === liftedIndex + 1) return 'left'
return undefined
}