eny.space Landingpage
1
fork

Configure Feed

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

Merge branch 'fix/vercel-build' into feature/dashboard

+43 -38
+22 -18
app/actions/components/ui/badge.tsx
··· 1 1 import * as React from "react" 2 2 import { cva, type VariantProps } from "class-variance-authority" 3 - import { Slot } from "radix-ui" 3 + import { Slot } from "@radix-ui/react-slot" 4 4 5 5 import { cn } from "@/actions/lib/utils" 6 6 ··· 27 27 } 28 28 ) 29 29 30 - function Badge({ 31 - className, 32 - variant = "default", 33 - asChild = false, 34 - ...props 35 - }: React.ComponentProps<"span"> & 36 - VariantProps<typeof badgeVariants> & { asChild?: boolean }) { 37 - const Comp = asChild ? Slot.Root : "span" 30 + type BadgeProps = React.HTMLAttributes<HTMLSpanElement> & 31 + VariantProps<typeof badgeVariants> & { 32 + asChild?: boolean 33 + } 38 34 39 - return ( 40 - <Comp 41 - data-slot="badge" 42 - data-variant={variant} 43 - className={cn(badgeVariants({ variant }), className)} 44 - {...props} 45 - /> 46 - ) 47 - } 35 + const Badge = React.forwardRef<HTMLSpanElement, BadgeProps>( 36 + ({ className, variant = "default", asChild = false, ...props }, ref) => { 37 + const Comp = asChild ? Slot : "span" 38 + 39 + return ( 40 + <Comp 41 + data-slot="badge" 42 + data-variant={variant} 43 + className={cn(badgeVariants({ variant }), className)} 44 + ref={ref} 45 + {...props} 46 + /> 47 + ) 48 + } 49 + ) 50 + 51 + Badge.displayName = "Badge" 48 52 49 53 export { Badge, badgeVariants }
+21 -20
app/actions/components/ui/button.tsx
··· 1 1 import * as React from "react" 2 2 import { cva, type VariantProps } from "class-variance-authority" 3 - import { Slot } from "radix-ui" 3 + import { Slot } from "@radix-ui/react-slot" 4 4 5 5 import { cn } from "@/actions/lib/utils" 6 6 ··· 41 41 } 42 42 ) 43 43 44 - function Button({ 45 - className, 46 - variant = "default", 47 - size = "default", 48 - asChild = false, 49 - ...props 50 - }: React.ComponentProps<"button"> & 44 + type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & 51 45 VariantProps<typeof buttonVariants> & { 52 46 asChild?: boolean 53 - }) { 54 - const Comp = asChild ? Slot.Root : "button" 47 + } 48 + 49 + const Button = React.forwardRef<HTMLButtonElement, ButtonProps>( 50 + ({ className, variant = "default", size = "default", asChild = false, ...props }, ref) => { 51 + const Comp = asChild ? Slot : "button" 52 + 53 + return ( 54 + <Comp 55 + data-slot="button" 56 + data-variant={variant} 57 + data-size={size} 58 + className={cn(buttonVariants({ variant, size, className }))} 59 + ref={ref} 60 + {...props} 61 + /> 62 + ) 63 + } 64 + ) 55 65 56 - return ( 57 - <Comp 58 - data-slot="button" 59 - data-variant={variant} 60 - data-size={size} 61 - className={cn(buttonVariants({ variant, size, className }))} 62 - {...props} 63 - /> 64 - ) 65 - } 66 + Button.displayName = "Button" 66 67 67 68 export { Button, buttonVariants }