mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 12:55:06 +03:00
* init * Update component-preview.tsx * please note: changed redirects in block, so need to update the logic to find and replace the redirects * Fix the redirect urls to work when installing and in examples. * Revert some of the changes. * Add a step when building the registry to clean the registry of example code. * Fix the clean registry script. --------- Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
12 lines
519 B
TypeScript
12 lines
519 B
TypeScript
import { type ComponentPropsWithoutRef } from 'react'
|
|
import { cn } from 'ui'
|
|
|
|
export function Link({ className, href, ...props }: ComponentPropsWithoutRef<'a'>) {
|
|
// A simplified link component for UI Library examples
|
|
// Renders as a regular <a> tag to support iframe base path routing
|
|
// Remove leading slash for relative paths to work with base tag
|
|
const relativeHref = href?.startsWith('/') ? href.slice(1) : href
|
|
|
|
return <a {...props} href={relativeHref} className={cn('cursor-pointer', className)} />
|
|
}
|