mirror of
https://github.com/supabase/supabase.git
synced 2026-10-16 06:39:09 +03:00
* Add org plan and num projects to organization action card * Small fix to feature preview modal
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import { Badge, Card, cn } from 'ui'
|
|
|
|
export const ActionCard = (card: {
|
|
icon: JSX.Element
|
|
title: string
|
|
bgColor?: string
|
|
description?: string
|
|
isBeta?: boolean
|
|
className?: string
|
|
onClick?: () => void
|
|
}) => {
|
|
return (
|
|
<Card
|
|
className={cn(
|
|
'grow bg-surface-100 p-3 transition-colors hover:bg-surface-200 border border-light 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 bg-opacity-100 text-xs text-foreground">
|
|
Coming soon
|
|
</Badge>
|
|
)}
|
|
<div
|
|
className={`rounded-full ${card.bgColor} w-8 h-8 flex items-center justify-center flex-shrink-0`}
|
|
>
|
|
{card.icon}
|
|
</div>
|
|
<div className="flex flex-col gap-0">
|
|
<h3 className="text-sm text-foreground mb-0">{card.title}</h3>
|
|
<pre className="text-xs text-foreground-light font-sans">{card.description}</pre>
|
|
</div>
|
|
</div>
|
|
</Card>
|
|
)
|
|
}
|