mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 20:05:06 +03: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>
60 lines
1.7 KiB
TypeScript
60 lines
1.7 KiB
TypeScript
import SectionContainer from '~/components/Layouts/SectionContainer'
|
|
import { ArrowUpRight } from 'lucide-react'
|
|
import Link from 'next/link'
|
|
import { ReactNode } from 'react'
|
|
import ReactMarkdown from 'react-markdown'
|
|
import { Button, cn } from 'ui'
|
|
|
|
interface Feature {
|
|
icon: string
|
|
title: string
|
|
text: string
|
|
}
|
|
interface Props {
|
|
id?: string
|
|
title: string | ReactNode
|
|
paragraph?: string
|
|
cta?: {
|
|
label?: string
|
|
link: string
|
|
}
|
|
content?: string
|
|
className?: string
|
|
hasStickyTitle?: boolean
|
|
}
|
|
|
|
const FeaturesSection = ({
|
|
id,
|
|
title,
|
|
content,
|
|
cta,
|
|
paragraph,
|
|
className,
|
|
hasStickyTitle,
|
|
}: Props) => (
|
|
<SectionContainer id={id} className={className}>
|
|
<div className="grid grid-cols-1 lg:grid-cols-12 gap-4 md:gap-8 xl:gap-10 justify-between">
|
|
<div className="col-span-full lg:col-span-4 gap-2 flex flex-col items-start">
|
|
<div className={cn('gap-2 flex flex-col items-start', hasStickyTitle && 'sticky top-24')}>
|
|
<h2 className="text-2xl sm:text-3xl xl:text-4xl max-w-[280px] sm:max-w-xs xl:max-w-[360px] tracking-[-1px]">
|
|
{title}
|
|
</h2>
|
|
<p className="text-lighter mb-4 font-mono">{paragraph}</p>
|
|
{cta && (
|
|
<Button asChild type="default" size="small" icon={<ArrowUpRight />}>
|
|
<Link href={cta.link}>{cta.label ?? 'Explore documentation'}</Link>
|
|
</Button>
|
|
)}
|
|
</div>
|
|
</div>
|
|
{content && (
|
|
<div className="col-span-full lg:col-start-6 lg:col-span-7 prose max-w-none! text-foreground-light">
|
|
<ReactMarkdown>{content}</ReactMarkdown>
|
|
</div>
|
|
)}
|
|
</div>
|
|
</SectionContainer>
|
|
)
|
|
|
|
export default FeaturesSection
|