Files
supabase/apps/docs/features/docs/Reference.header.tsx
T
65b962e771 design system: text color contrast (#38343)
* Refactor Drawer component and add date-fns dependency

Refactored the Drawer component for improved slot-based structure, updated styles, and added 'use client' directive. Added 'date-fns' as a dependency in design-system, updated tsconfig paths for icons, and marked ToggleGroup as a client component.

* nit: add env for svg path

* fix: instructions

* accent color docs and basic tidy

* copy value feature

* improve color contrast

* increase contrast on text-warning in light mode

* update changelog

* replace outdated text-warning utility classes

* remove redundant warning-600

* minor design-system docs updates

* docs updates

* remove unused brand-button class

* update docs

* fix: restore brand default

* update docs brand text color

* low hanging branded text fruit

* Nit refactor and clean  up

* re-add Kemal’s README instructions for hot reload

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-09-09 11:45:08 +10:00

55 lines
1.4 KiB
TypeScript

import { Github } from 'lucide-react'
import Link from 'next/link'
import { cn } from 'ui'
import MenuIconPicker from '~/components/Navigation/NavigationMenu/MenuIconPicker'
interface ClientLibHeaderProps {
menuData: {
title: string
icon?: string
pkg: {
name: string
repo: string
}
}
className?: string
}
function ClientLibHeader({ menuData, className }: ClientLibHeaderProps) {
return (
<div className={cn('flex items-start gap-6', className)}>
{'icon' in menuData && (
<MenuIconPicker
icon={menuData.icon || ''}
width={35}
height={35}
className="text-foreground-light"
/>
)}
<div className="flex flex-col gap-2">
<h1 id="introduction" className="text-3xl text-foreground">
{menuData.title} Client Library
</h1>
<span
className={cn('text-base font-mono text-foreground-light', 'flex items-center gap-2')}
>
{menuData.pkg.name}
<Link
href={menuData.pkg.repo}
target="_blank"
rel="noreferrer noopener"
className="hover:text-brand-link focus-visible:text-brand-link transition-colors"
>
<span className="sr-only">View on GitHub</span>
<Github size={18} />
</Link>
</span>
</div>
</div>
)
}
export { ClientLibHeader }