remove Next/Link deps

This commit is contained in:
Jonathan Summers-Muir committed 2023-06-26 01:08:20 +08:00
1 parent f4f7c8b294
commit 5405493ce5
6 files changed
+25 -32

No files matched your search

+1
View File
@@ -0,0 +1 @@
.vercel
@@ -3,20 +3,20 @@ import Link from 'next/link'
function TextLink({ url = '', label, ...props }: any) {
return (
<Link href={url} passHref>
<a
className="text-scale-1100 hover:text-scale-1200 mt-3 block cursor-pointer text-sm"
{...props}
>
<div className="group flex items-center gap-1">
<span className="sr-only">{`${label} about ${url}`}</span>
<span>{label}</span>
<div className="transition-all group-hover:ml-0.5">
<IconChevronRight size={14} strokeWidth={2} />
</div>
// <Link href={url} passHref>
<a
className="text-scale-1100 hover:text-scale-1200 mt-3 block cursor-pointer text-sm"
{...props}
>
<div className="group flex items-center gap-1">
<span className="sr-only">{`${label} about ${url}`}</span>
<span>{label}</span>
<div className="transition-all group-hover:ml-0.5">
<IconChevronRight size={14} strokeWidth={2} />
</div>
</a>
</Link>
</div>
</a>
// </Link>
)
}
@@ -1,7 +1,7 @@
import { Button } from '@ui/components/shadcn/ui/button'
import { Meta } from '@storybook/react'
import { ChevronRight, Loader2, Mail } from 'lucide-react'
import Link from 'next/link'
// import Link from 'next/link'
const meta: Meta = {
title: 'Button',
@@ -28,11 +28,11 @@ export const Ghost = () => <Button variant="ghost">Ghost</Button>
Ghost.storyName = 'Ghost'
export const LinkButton = () => (
<Link href="/">
<Button variant="link">Link</Button>
</Link>
)
// export const LinkButton = () => (
// <Link href="/">
// <Button variant="link">Link</Button>
// </Link>
// )
LinkButton.storyName = 'Link'
@@ -12,7 +12,7 @@ import {
FormMessage,
} from '@ui/components/shadcn/ui/form'
import { toast } from '@ui/components/shadcn/ui/use-toast'
import Link from 'next/link'
// import Link from 'next/link'
import { useForm } from 'react-hook-form'
import * as z from 'zod'
@@ -113,7 +113,7 @@ export function CheckboxReactHookFormSingle() {
<FormLabel>Use different settings for my mobile devices</FormLabel>
<FormDescription>
You can manage your mobile notifications in the{' '}
<Link href="/examples/forms">mobile settings</Link> page.
<a href="/examples/forms">mobile settings</a> page.
</FormDescription>
</div>
</FormItem>
@@ -1,7 +1,7 @@
import { Meta } from '@storybook/react'
import { Card } from '@ui/components/shadcn/ui/card'
import * as React from 'react'
import Link from 'next/link'
// import Link from 'next/link'
import { cn } from '@ui/lib/utils'
import {
NavigationMenu,
@@ -139,13 +139,6 @@ export function Default() {
</ul>
</NavigationMenuContent>
</NavigationMenuItem>
<NavigationMenuItem>
<Link href="/docs" legacyBehavior passHref>
<NavigationMenuLink className={navigationMenuTriggerStyle()}>
Documentation
</NavigationMenuLink>
</Link>
</NavigationMenuItem>
</NavigationMenuList>
</NavigationMenu>
</div>
@@ -21,7 +21,7 @@ import {
SelectValue,
} from '@ui/components/shadcn/ui/select'
import { toast } from '@ui/components/shadcn/ui/use-toast'
import Link from 'next/link'
// import Link from 'next/link'
import { useForm } from 'react-hook-form'
import * as z from 'zod'
import { SelectSeparator } from '../select'
@@ -122,8 +122,7 @@ export function SelectForm() {
</SelectContent>
</Select>
<FormDescription>
You can manage email addresses in your{' '}
<Link href="/examples/forms">email settings</Link>.
You can manage email addresses in your <a href="/examples/forms">email settings</a>.
</FormDescription>
<FormMessage />
</FormItem>