Skip to content

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

chore: migrate/remove Card_legacy_ (#45680)

Gildas Garcia106d4e6add9f
diff --git a/apps/www/pages/company.tsx b/apps/www/pages/company.tsx
index bb573317f17..7334f846714 100644
--- a/apps/www/pages/company.tsx
+++ b/apps/www/pages/company.tsx
@@ -1,5 +1,6 @@
import Layout from '~/components/Layouts/Default'
import SectionContainer from '~/components/Layouts/SectionContainer'
+import Panel from '~/components/Panel'
import { breadcrumbs } from '~/lib/breadcrumbs'
import { breadcrumbListSchema, serializeJsonLd } from '~/lib/json-ld'
import CTABanner from 'components/CTABanner/index'
@@ -14,7 +15,7 @@ import Head from 'next/head'
import Image from 'next/image'
import Link from 'next/link'
import { useRouter } from 'next/router'
-import { Button, Card_legacy_, Space } from 'ui'
+import { Button, Card, CardContent, CardHeader, CardTitle, Space } from 'ui'
type Props = {}
@@ -84,15 +85,13 @@ const Team = () => {
return (
<div className="border-t border-default">
<SectionContainer>
- <SectionHeader title="Team" paragraph={<div></div>} />
+ <SectionHeader title="Team" />
<div className="grid grid-cols-2 md:grid-cols-12">
<div className="col-span-8 ">
- <p>
- <p className="text-foreground text-lg">
- Supabase is fully remote, with a strong affinity for open source maintainers and
- ex-Founders. Our engineering team is made up of developers from AWS, Google,
- Palantir, Stripe, and other YC companies.
- </p>
+ <p className="text-foreground text-lg">
+ Supabase is fully remote, with a strong affinity for open source maintainers and
+ ex-Founders. Our engineering team is made up of developers from AWS, Google, Palantir,
+ Stripe, and other YC companies.
</p>
</div>
<div className=" col-span-4 pt-8 md:mt-0 md:text-right">
@@ -169,12 +168,8 @@ const Investors = () => {
title="Our investors"
paragraph={
<>
- <p>
- <p className="text-lg">
- We've raised over $116 million in funding, backed by some of the world's leading
- investors.
- </p>
- </p>
+ We've raised over $116 million in funding, backed by some of the world's leading
+ investors.
</>
}
/>
@@ -236,33 +231,55 @@ const Press = () => {
</div>
<div className="mx-auto mt-5 grid gap-5 lg:max-w-none lg:grid-cols-3">
{PressData.filter((x) => x.type == 'article').map((x) => (
- <Link href={x.href} key={x.href} target="_blank">
- <Card_legacy_ key={`press_${x.href}`} hoverable className="h-36">
- <Space className="h-40 justify-between" direction="vertical">
- <div>
- <h1 className="text-foreground text-xl">{x.type.toUpperCase()}</h1>
+ <Link
+ href={x.href}
+ key={x.href}
+ target="_blank"
+ className="flex flex-col justify-start items-stretch group cursor-pointer transition rounded-xl focus-visible:ring-2 focus-visible:ring-foreground-lighter outline-hidden outline-0 focus-visible:outline-4 focus-visible:outline-offset-1 focus-visible:outline-foreground-lighter"
+ >
+ <Panel
+ hasActiveOnHover
+ outerClassName="h-full"
+ innerClassName="flex md:flex-col gap-3 sm:gap-2 h-full items-start p-2"
+ >
+ <div className="md:p-2 md:pt-1 flex flex-col h-full md:h-auto grow gap-0.5 md:gap-1.5 justify-center md:justify-start">
+ <h3 className="text-sm md:text-base text-foreground leading-5!">
+ {x.type.toUpperCase()}
+ </h3>
+ <div className="flex flex-wrap items-center gap-1 mb-0.5">
<p className="text-foreground-light line-clamp block h-12 overflow-hidden text-ellipsis text-base">
{x.title}
</p>
</div>
- </Space>
- </Card_legacy_>
+ </div>
+ </Panel>
</Link>
))}
</div>
<div className="mx-auto mt-5 grid gap-5 sm:grid-cols-2 lg:max-w-none lg:grid-cols-4">
{PressData.filter((x) => x.type == 'podcast').map((x) => (
- <Link href={x.href} key={x.href} target="_blank">
- <Card_legacy_ key={`press_${x.href}`} hoverable className="h-36">
- <Space className="h-40 justify-between" direction="vertical">
- <div>
- <h1 className="text-foreground text-xl">{x.type.toUpperCase()}</h1>
+ <Link
+ href={x.href}
+ key={x.href}
+ target="_blank"
+ className="flex flex-col justify-start items-stretch group cursor-pointer transition rounded-xl focus-visible:ring-2 focus-visible:ring-foreground-lighter outline-hidden outline-0 focus-visible:outline-4 focus-visible:outline-offset-1 focus-visible:outline-foreground-lighter"
+ >
+ <Panel
+ hasActiveOnHover
+ outerClassName="h-full"
+ innerClassName="flex md:flex-col gap-3 sm:gap-2 h-full items-start p-2"
+ >
+ <div className="md:p-2 md:pt-1 flex flex-col h-full md:h-auto grow gap-0.5 md:gap-1.5 justify-center md:justify-start">
+ <h3 className="text-sm md:text-base text-foreground leading-5!">
+ {x.type.toUpperCase()}
+ </h3>
+ <div className="flex flex-wrap items-center gap-1 mb-0.5">
<p className="text-foreground-light line-clamp block h-12 overflow-hidden text-ellipsis text-base">
{x.title}
</p>
</div>
- </Space>
- </Card_legacy_>
+ </div>
+ </Panel>
</Link>
))}
</div>
diff --git a/packages/ui/index.tsx b/packages/ui/index.tsx
index a5a207e7642..40befcc14fe 100644
--- a/packages/ui/index.tsx
+++ b/packages/ui/index.tsx
@@ -5,7 +5,6 @@ export * from './src/components/Icon/IconBackground'
// DISPLAYS
-export { Card as Card_legacy_ } from './src/components/Card'
export * from './src/components/Tabs'
export * from './src/components/Alert'
export * from './src/components/Accordion'
diff --git a/packages/ui/src/components/Card/Card.module.css b/packages/ui/src/components/Card/Card.module.css
deleted file mode 100644
index 72d46b17ed5..00000000000
--- a/packages/ui/src/components/Card/Card.module.css
+++ /dev/null
@@ -1,27 +0,0 @@
-.sbui-card {
- @apply flex flex-col bg-white [[data-theme*=dark]_&]:bg-dark-700 rounded-md shadow-lg overflow-hidden relative;
-
- border: 1px solid #e0e0e0;
-}
-
-.sbui-card--hoverable {
- @apply transition transform hover:-translate-y-1 hover:shadow-2xl;
-}
-
-.dark .sbui-card {
- border: 1px solid #2a2a2a;
-}
-
-.sbui-card-head {
- @apply px-8 py-6 flex justify-between;
-
- border-bottom: 1px solid #e0e0e0;
-}
-
-.dark .sbui-card-head {
- border-bottom: 1px solid #2a2a2a;
-}
-
-.sbui-card-content {
- @apply p-8;
-}
diff --git a/packages/ui/src/components/Card/Card.tsx b/packages/ui/src/components/Card/Card.tsx
deleted file mode 100644
index ae3d3a702bf..00000000000
--- a/packages/ui/src/components/Card/Card.tsx
+++ /dev/null
@@ -1,59 +0,0 @@
-import React from 'react'
-
-import styleHandler from '../../lib/theme/styleHandler'
-import Typography from '../Typography'
-
-interface CardProps {
- children?: React.ReactNode
- className?: string
- cover?: React.ReactNode
- description?: string
- hoverable?: boolean
- style?: React.CSSProperties
- title?: string
- titleExtra?: React.ReactNode
-}
-
-function Card({ children, className, cover, hoverable, style, title, titleExtra }: CardProps) {
- let __styles = styleHandler('card')
-
- let classes = [__styles.base]
- if (hoverable) classes.push(__styles.hoverable)
- if (className) classes.push(className)
-
- return (
- <div className={classes.join(' ')} style={style}>
- {title && (
- <div className={__styles.head}>
- <Typography.Text style={{ margin: 0 }}>{title}</Typography.Text>
- <Typography.Link style={{ margin: 0 }}>{titleExtra}</Typography.Link>
- </div>
- )}
- {cover}
- <div className={__styles.content}>{children}</div>
- </div>
- )
-}
-
-interface MetaProps {
- title?: string
- description?: string
- style?: React.CSSProperties
- className?: string
-}
-
-function Meta({ title, description, style, className }: MetaProps) {
- return (
- <div style={style} className={className}>
- <Typography.Title style={{ margin: '0' }} level={5}>
- {title}
- </Typography.Title>
- <div>
- <Typography.Text type="secondary">{description}</Typography.Text>
- </div>
- </div>
- )
-}
-
-Card.Meta = Meta
-export default Card
diff --git a/packages/ui/src/components/Card/index.tsx b/packages/ui/src/components/Card/index.tsx
deleted file mode 100644
index 03fa782ed13..00000000000
--- a/packages/ui/src/components/Card/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export { default as Card } from './Card'