Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fix card button classes

Terry Suttond316fc9e9e65
diff --git a/studio/components/interfaces/Home/ProjectList/ProjectCard.tsx b/studio/components/interfaces/Home/ProjectList/ProjectCard.tsx
index a97bc84152e..5c53d43afaf 100644
--- a/studio/components/interfaces/Home/ProjectList/ProjectCard.tsx
+++ b/studio/components/interfaces/Home/ProjectList/ProjectCard.tsx
@@ -36,7 +36,7 @@ const ProjectCard = ({
<li className="col-span-1 list-none">
<CardButton
linkHref={rewriteHref ? rewriteHref : `/project/${projectRef}`}
- containerHeightClassName="h-44"
+ className="h-44 !px-0"
title={
<div className="w-full justify-between space-y-1.5 px-6">
<p className="flex-shrink truncate text-base">{name}</p>
diff --git a/studio/components/interfaces/SQLEditor/SQLTemplates/SQLCard.tsx b/studio/components/interfaces/SQLEditor/SQLTemplates/SQLCard.tsx
index b02cab1ca40..1d4f42e5b38 100644
--- a/studio/components/interfaces/SQLEditor/SQLTemplates/SQLCard.tsx
+++ b/studio/components/interfaces/SQLEditor/SQLTemplates/SQLCard.tsx
@@ -20,6 +20,7 @@ const SQLCard = ({ title, description, sql, onClick }: SQLCardProps) => {
title={title}
loading={loading}
onClick={() => handleOnClick()}
+ className="px-6"
footer={<span className="text-scale-1100 text-sm">{description}</span>}
/>
)
diff --git a/studio/components/ui/CardButton.tsx b/studio/components/ui/CardButton.tsx
index 9c0690af6ac..6019b996d17 100644
--- a/studio/components/ui/CardButton.tsx
+++ b/studio/components/ui/CardButton.tsx
@@ -12,8 +12,8 @@ interface CardButtonProps {
imgAlt?: string
onClick?: () => void
icon?: React.ReactNode
- containerHeightClassName?: string
loading?: boolean
+ className?: string
}
const CardButton = ({
@@ -27,7 +27,7 @@ const CardButton = ({
imgAlt,
onClick,
icon,
- containerHeightClassName = '',
+ className,
loading = false,
}: PropsWithChildren<CardButtonProps>) => {
const LinkContainer = ({ children }: { children: React.ReactNode }) => (
@@ -44,12 +44,12 @@ const CardButton = ({
const isLink = url || linkHref || onClick
let containerClasses = [
+ className,
'group relative text-left',
'bg-panel-header-light dark:bg-panel-header-dark',
'border border-panel-border-light dark:border-panel-border-dark',
- 'rounded-md py-4 flex flex-row',
+ 'rounded-md py-4 px-4 flex flex-row h-32',
'transition ease-in-out duration-150',
- containerHeightClassName,
]
if (isLink) {
diff --git a/studio/pages/project/[ref]/logs/explorer/templates.tsx b/studio/pages/project/[ref]/logs/explorer/templates.tsx
index 7eb8d932f42..90e8b5f269a 100644
--- a/studio/pages/project/[ref]/logs/explorer/templates.tsx
+++ b/studio/pages/project/[ref]/logs/explorer/templates.tsx
@@ -50,7 +50,7 @@ const Template = ({ projectRef, template }: { projectRef?: string; template: Log
</div>
</div>
}
- containerHeightClassName="h-40"
+ className="h-40 px-6"
linkHref={`/project/${projectRef}/logs/explorer?q=${encodeURI(template.searchString)}`}
description={template.description}
footer={