The weeb for the next gen discord boat - Wamellow wamellow.com
bot discord
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

add LinkButton component

Luna 89b841fe 21192025

+29 -1
+29 -1
components/ui/button.tsx
··· 1 1 import * as React from "react" 2 2 import { Slot } from "@radix-ui/react-slot" 3 3 import { cva, type VariantProps } from "class-variance-authority" 4 + import Link from "next/link"; 4 5 5 6 import { cn } from "@/utils/cn" 6 7 ··· 46 47 {...props} 47 48 /> 48 49 ) 50 + 51 + export interface LinkButtonProps extends Omit<ButtonProps, "asChild"> { 52 + href: string; 53 + target?: "_blank"; 54 + prefetch?: false; 55 + } 56 + 57 + const LinkButton = React.forwardRef<HTMLButtonElement, LinkButtonProps>( 58 + ({ children, href, target, prefetch, ...props }, ref) => { 59 + return ( 60 + <Button 61 + asChild 62 + ref={ref} 63 + {...props} 64 + > 65 + <Link 66 + href={href} 67 + target={target} 68 + prefetch={prefetch || true} 69 + > 70 + {children} 71 + </Link> 72 + </Button> 73 + ); 49 74 } 50 75 ) 51 76 Button.displayName = "Button" 77 + ); 52 78 53 - export { Button, buttonVariants } 79 + LinkButton.displayName = "LinkButton"; 80 + 81 + export { Button, buttonVariants,LinkButton };