Beautiful map components. 100% Free, Zero config, one command setup.
TypeScript
feat(sponsors): restyle custom contact section as a layered card
Anmolf18a381d2b47
diff --git a/src/app/(main)/sponsors/_components/sponsor-custom.tsx b/src/app/(main)/sponsors/_components/sponsor-custom.tsxnew file mode 100644index 0000000..b7b383e--- /dev/null+++ b/src/app/(main)/sponsors/_components/sponsor-custom.tsx@@ -0,0 +1,65 @@+import { ArrowUpRight } from "lucide-react";++import { CodeCopyButton } from "@/components/code-copy-button";+import { sponsorEmail, xProfileUrl } from "@/lib/sponsors";++export function SponsorCustom() {+ return (+ <section+ aria-labelledby="custom-heading"+ className="bg-muted ring-foreground/5 dark:bg-muted/30 mx-auto w-full max-w-4xl rounded-2xl p-2 ring-1"+ >+ <div className="bg-background ring-foreground/10 dark:ring-foreground/5 grid overflow-hidden rounded-lg shadow-xs ring-1 md:grid-cols-[1.15fr_1fr]">+ <div className="flex flex-col justify-center gap-3 p-6 sm:p-8 md:p-10">+ <h2+ id="custom-heading"+ className="text-2xl font-semibold tracking-tight text-balance md:text-3xl"+ >+ Need something custom?+ </h2>+ <p className="text-muted-foreground max-w-sm text-[15px] leading-relaxed text-pretty">+ A launch campaign, a different placement, or just a question first.+ Happy to put something together.+ </p>+ </div>++ <div className="flex flex-col divide-y border-t md:border-t-0 md:border-l">+ <div className="flex flex-1 items-center justify-between gap-4 py-5 pr-4 pl-6 sm:pl-8">+ <ContactValue label="Email">{sponsorEmail}</ContactValue>+ <CodeCopyButton+ text={sponsorEmail}+ label="Copy email"+ className="bg-transparent"+ />+ </div>+ <a+ href={xProfileUrl}+ target="_blank"+ rel="noopener noreferrer"+ className="group hover:bg-muted/50 flex flex-1 items-center justify-between gap-4 py-5 pr-6 pl-6 transition-colors sm:pl-8"+ >+ <ContactValue label="DM on X">+ @{xProfileUrl.split("/").pop()}+ </ContactValue>+ <ArrowUpRight className="text-muted-foreground group-hover:text-foreground size-4 shrink-0 transition-colors" />+ </a>+ </div>+ </div>+ </section>+ );+}++function ContactValue({+ label,+ children,+}: {+ label: string;+ children: React.ReactNode;+}) {+ return (+ <div className="flex min-w-0 flex-col gap-1">+ <span className="text-muted-foreground text-sm">{label}</span>+ <span className="truncate text-[15px] font-medium">{children}</span>+ </div>+ );+}diff --git a/src/app/(main)/sponsors/page.tsx b/src/app/(main)/sponsors/page.tsxindex c816b57..33860ac 100644--- a/src/app/(main)/sponsors/page.tsx+++ b/src/app/(main)/sponsors/page.tsx@@ -1,7 +1,6 @@import { Metadata } from "next";import Link from "next/link";-import { CodeCopyButton } from "@/components/code-copy-button";import { Footer } from "@/components/footer";import {PageActions,@@ -17,15 +16,10 @@ import {} from "@/components/ui/accordion";import { TextLink } from "@/components/text-link";import { Button } from "@/components/ui/button";-import {- checkoutEnabled,- githubSponsorsUrl,- sponsorEmail,- sponsors,- xProfileUrl,-} from "@/lib/sponsors";+import { checkoutEnabled, githubSponsorsUrl, sponsors } from "@/lib/sponsors";import { PlacementPreviews } from "./_components/placement-preview";import { SponsorContactButton } from "./_components/sponsor-contact-button";+import { SponsorCustom } from "./_components/sponsor-custom";import { SponsorStats } from "./_components/sponsor-stats";import { SponsorTiers } from "./_components/sponsor-tiers";import { SponsorWall } from "./_components/sponsor-wall";@@ -61,7 +55,7 @@ export default function Page() {</PageHeader><div className="container pb-24">- <div className="mx-auto max-w-6xl space-y-24 md:space-y-36">+ <div className="mx-auto max-w-7xl space-y-24 md:space-y-36"><SponsorStats />{sponsors.length > 0 && (@@ -110,43 +104,7 @@ export default function Page() {</Accordion></Section>- <section className="bg-muted ring-foreground/5 dark:bg-muted/30 flex flex-col items-center gap-8 rounded-2xl px-6 py-14 text-center ring-1 md:py-20">- <div className="space-y-3">- <h2 className="text-2xl font-semibold tracking-tight text-balance md:text-3xl">- Need something custom?- </h2>- <p className="text-muted-foreground mx-auto max-w-sm text-[15px] leading-relaxed text-pretty md:text-base">- A launch campaign, a different placement, or just a question- first. Happy to put something together.- </p>- </div>- <div className="flex flex-wrap items-center justify-center gap-3">- <div className="bg-background ring-foreground/10 flex h-10 items-center gap-1 rounded-lg pr-1 pl-4 shadow-xs ring-1">- <span className="text-foreground/80 text-sm">- {sponsorEmail}- </span>- <CodeCopyButton- text={sponsorEmail}- label="Copy email"- className="bg-transparent"- />- </div>- <Button- variant="outline"- size="lg"- className="rounded-lg"- asChild- >- <a- href={xProfileUrl}- target="_blank"- rel="noopener noreferrer"- >- DM on X- </a>- </Button>- </div>- </section>+ <SponsorCustom /></div></div></div>