mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 20:05:06 +03:00
This PR migrates the JS config for Tailwind into a CSS config. As such, all variables have been defined as CSS variables and they're using the specialized Tailwind syntax for generating utility classes. Beside the migration, these changes were also added: - Added `tailwind.config.css` to few packages to make the Tailwind Intellisense work. - Migrated away from Radix style color classes to our defined classes, the values will remain the same. - Most of the CSS is generated by scripts, they'll be removed in next PRs. * Removed redundant `border-light` classes from several components since it was undefined. * Removed redundant `text-strong` classes from several components since it was undefined. How to test: - Open all apps, compare the UI (mainly colors) to builds from #45417 and try to find a difference. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Harmonized color variable usages and updated UI color references (affects palettes, charts, gradients, hero illustrations, and scrollbars). * Tweaked border, tab, and selection visuals across components. * **New Features** * Added a suite of theme animations and refined typography presets used by site prose and docs. * **Refactor** * Overhauled Tailwind/theme configuration and color token generation for more consistent theming. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
46 lines
1.3 KiB
TypeScript
46 lines
1.3 KiB
TypeScript
import type { ReactNode } from 'react'
|
|
import { Badge, Card, cn } from 'ui'
|
|
|
|
export const ActionCard = (card: {
|
|
icon: ReactNode
|
|
title: string
|
|
bgColor?: string
|
|
description?: ReactNode
|
|
isBeta?: boolean
|
|
className?: string
|
|
onClick?: () => void
|
|
}) => {
|
|
return (
|
|
<Card
|
|
className={cn(
|
|
'grow bg-surface-100 p-3 transition-colors hover:bg-surface-200 border hover:border-default cursor-pointer',
|
|
card.className
|
|
)}
|
|
onClick={card.onClick}
|
|
>
|
|
<div className={`relative flex items-start gap-3`}>
|
|
{card.isBeta && (
|
|
<Badge className="absolute -right-5 -top-5 bg-surface-300 text-xs text-foreground">
|
|
Coming soon
|
|
</Badge>
|
|
)}
|
|
<div
|
|
className={`rounded-full ${card.bgColor} w-8 h-8 flex items-center justify-center shrink-0`}
|
|
>
|
|
{card.icon}
|
|
</div>
|
|
<div className="grow flex flex-col gap-0 min-w-0">
|
|
<h3 title={card.title} className="text-sm text-foreground mb-0 truncate max-w-full">
|
|
{card.title}
|
|
</h3>
|
|
{typeof card.description === 'string' ? (
|
|
<pre className="text-xs text-foreground-light font-sans">{card.description}</pre>
|
|
) : (
|
|
card.description
|
|
)}
|
|
</div>
|
|
</div>
|
|
</Card>
|
|
)
|
|
}
|