mirror of
https://github.com/supabase/supabase.git
synced 2026-05-07 06:27:16 +08:00
This PR migrates the whole monorepo to use Tailwind v4: - Removed `@tailwindcss/container-queries` plugin since it's included by default in v4, - Bump all instances of Tailwind to v4. Made minimal changes to the shared config to remove non-supported features (`alpha` mentions), - Migrate all apps to be compatible with v4 configs, - Fix the `typography.css` import in 3 apps, - Add missing rules which were included by default in v3, - Run `pnpm dlx @tailwindcss/upgrade` on all apps, which renames a lot of classes - Rename all misnamed classes according to https://tailwindcss.com/docs/upgrade-guide#renamed-utilities in all apps. --------- Co-authored-by: Jordi Enric <jordi.err@gmail.com>
73 lines
2.4 KiB
TypeScript
73 lines
2.4 KiB
TypeScript
'use client'
|
|
|
|
import { useBreakpoint } from 'common'
|
|
import { useTheme } from 'next-themes'
|
|
import Image from 'next/image'
|
|
import React, { useState } from 'react'
|
|
import { cn } from 'ui'
|
|
|
|
const PricingComputeAnimation = () => {
|
|
const { resolvedTheme } = useTheme()
|
|
const [triggerAnimation, setTriggerAnimation] = useState(false)
|
|
const isTablet = useBreakpoint(1023)
|
|
|
|
return (
|
|
<figure
|
|
className="h-full relative lg:absolute lg:-right-24 xl:-right-10 aspect-541/285"
|
|
onMouseEnter={() => setTriggerAnimation(true)}
|
|
>
|
|
<Image
|
|
fill
|
|
src={`/images/pricing/compute/compute-cube-${
|
|
resolvedTheme?.includes('dark') ? 'dark' : 'light'
|
|
}-active.svg`}
|
|
alt="Compute addon grid"
|
|
className={cn(
|
|
'absolute inset-0 z-20 transition-opacity opacity-0 ease-[cubic-bezier(.76,0,.23,1)]! duration-300',
|
|
triggerAnimation && 'opacity-100'
|
|
)}
|
|
/>
|
|
<Image
|
|
fill
|
|
src={`/images/pricing/compute/compute-cube-${
|
|
resolvedTheme?.includes('dark') ? 'dark' : 'light'
|
|
}-active.svg`}
|
|
alt="Compute addon grid"
|
|
className={cn(
|
|
'absolute inset-0 z-20 transition-all opacity-0 ease-[cubic-bezier(.76,0,.23,1)]! duration-500 delay-500 translate-y-[-18%] blur-md',
|
|
triggerAnimation && 'opacity-100 translate-y-[-8%] blur-none'
|
|
)}
|
|
/>
|
|
<Image
|
|
fill
|
|
src={`/images/pricing/compute/compute-cube-${
|
|
resolvedTheme?.includes('dark') ? 'dark' : 'light'
|
|
}-active.svg`}
|
|
alt="Compute addon grid"
|
|
className={cn(
|
|
'absolute inset-0 z-20 transition-all opacity-0 ease-[cubic-bezier(.76,0,.23,1)]! duration-500 delay-1000 translate-y-[-24%] blur-md',
|
|
triggerAnimation && 'opacity-100 translate-y-[-16%] blur-none'
|
|
)}
|
|
/>
|
|
<Image
|
|
fill
|
|
src={`/images/pricing/compute/compute-cube-${
|
|
resolvedTheme?.includes('dark') ? 'dark' : 'light'
|
|
}.svg`}
|
|
alt="Compute addon grid"
|
|
className="absolute inset-0 z-10"
|
|
/>
|
|
<Image
|
|
fill
|
|
src={`/images/pricing/compute/compute-grid${isTablet ? '-mobile' : ''}-${
|
|
resolvedTheme?.includes('dark') ? 'dark' : 'light'
|
|
}.svg`}
|
|
alt="Compute addon grid"
|
|
className="absolute inset-0 z-0 object-contain object-center"
|
|
/>
|
|
</figure>
|
|
)
|
|
}
|
|
|
|
export default PricingComputeAnimation
|