Files
supabase/apps/studio/components/ui/InlineLink.tsx
Joshen LimandSaxon Fletcher 32a042379e Auth Settings IA Update - Sign In / Up (#33579)
* page components

* page component changes

* settings but broken saving

* rvert

* use sheet for provider

* styling

* remove things

* Some refactoring and fixing, added JSDocs to layouts

* Smol refactor

* Fix

* Update JSDocs

* updated scaffolding

* Clean up

* Spelling

* Clean up FormFieldWrappers

* One last clean up

* Smol CSS tweak

---------

Co-authored-by: Saxon Fletcher <saxonafletcher@gmail.com>
2025-02-21 16:09:50 +08:00

32 lines
708 B
TypeScript

import Link from 'next/link'
import { PropsWithChildren } from 'react'
import { cn } from 'ui'
interface InlineLinkProps {
href: string
className?: string
}
export const InlineLink = ({
href,
className: _className,
children,
}: PropsWithChildren<InlineLinkProps>) => {
const className = cn(
'underline transition underline-offset-2 decoration-foreground-lighter hover:decoration-foreground text-foreground',
_className
)
if (href.startsWith('http')) {
return (
<a className={className} href={href} target="_blank" rel="noreferrer noopener">
{children}
</a>
)
}
return (
<Link className={className} href={href}>
{children}
</Link>
)
}