mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 08:29:01 +00: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>
56 lines
1.8 KiB
TypeScript
56 lines
1.8 KiB
TypeScript
import * as React from 'react'
|
|
|
|
import { cn } from '@/lib/utils'
|
|
|
|
const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
({ className, ...props }, ref) => (
|
|
<div
|
|
ref={ref}
|
|
className={cn('rounded-xl border bg-card text-card-foreground shadow-sm', className)}
|
|
{...props}
|
|
/>
|
|
)
|
|
)
|
|
Card.displayName = 'Card'
|
|
|
|
const CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
({ className, ...props }, ref) => (
|
|
<div ref={ref} className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />
|
|
)
|
|
)
|
|
CardHeader.displayName = 'CardHeader'
|
|
|
|
const CardTitle = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
({ className, ...props }, ref) => (
|
|
<div
|
|
ref={ref}
|
|
className={cn('font-semibold leading-none tracking-tight', className)}
|
|
{...props}
|
|
/>
|
|
)
|
|
)
|
|
CardTitle.displayName = 'CardTitle'
|
|
|
|
const CardDescription = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
({ className, ...props }, ref) => (
|
|
<div ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />
|
|
)
|
|
)
|
|
CardDescription.displayName = 'CardDescription'
|
|
|
|
const CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
({ className, ...props }, ref) => (
|
|
<div ref={ref} className={cn('p-6 pt-0', className)} {...props} />
|
|
)
|
|
)
|
|
CardContent.displayName = 'CardContent'
|
|
|
|
const CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
({ className, ...props }, ref) => (
|
|
<div ref={ref} className={cn('flex items-center p-6 pt-0', className)} {...props} />
|
|
)
|
|
)
|
|
CardFooter.displayName = 'CardFooter'
|
|
|
|
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle }
|