mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
## What kind of change does this PR introduce? Refactor. Follow-up to #49871. ## What is the current behavior? Branded (green) text still uses the `text-brand` classname while the colour comes from `--primary`. ## What is the new behavior? **Rename-only:** `text-brand` → `text-primary` across callsites and docs. Leftover `bg-brand` / `border-brand` alias to `brand-default`. No intentional colour changes in this PR. This better matches how we treat our green in other components and props, like `variant="primary"` for green buttons. ## To test On light mode: smoke-test that branded text still looks like #49871 (readable green, not the bright fill). - [Homepage](https://zone-www-dot-com-git-dnywh-depr-316-text-brand-de2380-supabase.vercel.app/): “Scale to millions” uses `text-primary` - [Docs homepage](https://docs-git-dnywh-depr-316-text-brand-to-primary-supabase.vercel.app/docs): branded links like “More on self-hosting” are still readable - [Typography docs](https://design-system-git-dnywh-depr-316-text-brand-to-primary-supabase.vercel.app/design-system/docs/typography): documents `text-primary` - [Colour usage](https://design-system-git-dnywh-depr-316-text-brand-to-primary-supabase.vercel.app/design-system/docs/color-usage): `text-primary` is visibly darker than `bg-brand-default` _on light mode_ - [Studio auth providers](https://studio-staging-git-dnywh-depr-316-text-brand-to-60fa6c-supabase.vercel.app/dashboard/project/_/auth/providers): enabled provider badge text readable; status dot stays bright green <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Updated branded text, link hover states, icons, badges, indicators, and highlighted content across the Design System, Docs, Studio, Learn, UI Library, and marketing experiences to use the primary theme color. * Updated syntax highlighting and table-of-contents styling for consistent primary-color presentation. * Refined brand color fallback behavior for bright fills and borders. * **Documentation** * Updated color-usage and typography guidance to recommend the primary text utility. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
85 lines
3.1 KiB
TypeScript
85 lines
3.1 KiB
TypeScript
import { ChevronRightIcon, VideoCameraIcon } from '@heroicons/react/solid'
|
|
import Link from 'next/link'
|
|
import React, { PropsWithChildren } from 'react'
|
|
import { cn } from 'ui'
|
|
import { TextLink } from 'ui-patterns/TextLink'
|
|
|
|
import Panel from './Panel'
|
|
|
|
interface Props {
|
|
className?: string
|
|
size?: 'tiny' | 'small' | 'large'
|
|
}
|
|
|
|
const EVENT_LINK = '/events/scale-to-millions-goodtape-auth'
|
|
|
|
const EventCallout = ({ className, size = 'tiny', ...props }: PropsWithChildren<Props>) => {
|
|
switch (size) {
|
|
case 'tiny':
|
|
return (
|
|
<Link
|
|
href={EVENT_LINK}
|
|
className={cn(
|
|
'group flex items-center flex-wrap text-sm text-foreground-light hover:text-foreground transition-opacity gap-y-0.5 gap-x-2 md:gap-2',
|
|
className
|
|
)}
|
|
{...props}
|
|
>
|
|
<span className="uppercase text-primary font-mono">Webinar</span>
|
|
{/* <span className="uppercase px-2 text-xs">23 Oct</span> */}
|
|
<span className="">Migrating to Supabase Auth / Good Tape</span>
|
|
<ChevronRightIcon className="translate-x-0 transition-transform group-hover:translate-x-0.5 w-3 h-3 -ml-1" />
|
|
</Link>
|
|
)
|
|
case 'small':
|
|
return (
|
|
<Link
|
|
href={EVENT_LINK}
|
|
className={cn(
|
|
'group flex items-center flex-wrap text-sm text-foreground-light hover:text-foreground transition-opacity',
|
|
className
|
|
)}
|
|
{...props}
|
|
>
|
|
<VideoCameraIcon className="w-4 h-4 text-primary mr-2" />
|
|
<span className="py-1 uppercase text-primary font-mono">Webinar</span>
|
|
<span className="py-1 uppercase mx-3 px-3 border-x">23 Oct</span>
|
|
<span className="py-1">Migrating to Supabase Auth / Good Tape</span>
|
|
<ChevronRightIcon className="translate-x-0 transition-transform group-hover:translate-x-0.5 w-3 h-3 ml-1.5" />
|
|
</Link>
|
|
)
|
|
case 'large':
|
|
return (
|
|
<Link href={EVENT_LINK} className={cn('w-full', className)} {...props}>
|
|
<Panel
|
|
outerClassName="w-full"
|
|
innerClassName="relative p-4 lg:p-8 h-full flex flex-col md:flex-row gap-4 md:gap-8"
|
|
>
|
|
<div className="relative h-52 lg:h-44 xl:h-52 aspect-2/1 md:aspect-3/2! rounded-lg border">
|
|
{/* <Image
|
|
src=""
|
|
fill
|
|
sizes="100%"
|
|
quality={100}
|
|
className="object-cover"
|
|
alt="event thumbnail"
|
|
/> */}
|
|
</div>
|
|
<div className="flex flex-col gap-2 md:gap-3 grow max-w-xl xl:justify-center">
|
|
<div className="flex flex-row text-sm">
|
|
<span className="uppercase text-primary font-mono">Webinar</span>
|
|
<span className="mx-3 pl-3 border-l">23 Oct 2024 at 10AM PST</span>
|
|
</div>
|
|
|
|
<span className="text-foreground text-3xl">Scale to Millions</span>
|
|
<p>Learn how to reduce costs while maintaining top-tier security with Supabase</p>
|
|
<TextLink label="Register now" />
|
|
</div>
|
|
</Panel>
|
|
</Link>
|
|
)
|
|
}
|
|
}
|
|
|
|
export default EventCallout
|