• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vintasoftware / nextjs-fastapi-template / 13813915942

12 Mar 2025 02:28PM UTC coverage: 98.372%. Remained the same
13813915942

push

github

web-flow
Merge pull request #80 from vintasoftware/ft/changelog

Ft/changelog

91 of 98 branches covered (92.86%)

Branch coverage included in aggregate %.

1480 of 1499 relevant lines covered (98.73%)

8.38 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

96.72
/nextjs-frontend/components/ui/button.tsx
1
import * as React from "react";
2✔
2
import { Slot } from "@radix-ui/react-slot";
2✔
3
import { cva, type VariantProps } from "class-variance-authority";
2✔
4

2✔
5
import { cn } from "@/lib/utils";
2✔
6

2✔
7
const buttonVariants = cva(
2✔
8
  "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
2✔
9
  {
2✔
10
    variants: {
2✔
11
      variant: {
2✔
12
        default:
2✔
13
          "bg-primary text-primary-foreground shadow hover:bg-primary/90",
2✔
14
        destructive:
2✔
15
          "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
2✔
16
        outline:
2✔
17
          "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
2✔
18
        secondary:
2✔
19
          "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
2✔
20
        ghost: "hover:bg-accent hover:text-accent-foreground",
2✔
21
        link: "text-primary underline-offset-4 hover:underline",
2✔
22
      },
2✔
23
      size: {
2✔
24
        default: "h-9 px-4 py-2",
2✔
25
        sm: "h-8 rounded-md px-3 text-xs",
2✔
26
        lg: "h-10 rounded-md px-8",
2✔
27
        icon: "h-9 w-9",
2✔
28
      },
2✔
29
    },
2✔
30
    defaultVariants: {
2✔
31
      variant: "default",
2✔
32
      size: "default",
2✔
33
    },
2✔
34
  },
2✔
35
);
2✔
36

2✔
37
export interface ButtonProps
2✔
38
  extends React.ButtonHTMLAttributes<HTMLButtonElement>,
2✔
39
    VariantProps<typeof buttonVariants> {
2✔
40
  asChild?: boolean;
2✔
41
}
2✔
42

2✔
43
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
2✔
44
  ({ className, variant, size, asChild = false, ...props }, ref) => {
2✔
45
    const Comp = asChild ? Slot : "button";
76!
46
    return (
76✔
47
      <Comp
76✔
48
        className={cn(buttonVariants({ variant, size, className }))}
76✔
49
        ref={ref}
76✔
50
        {...props}
76✔
51
      />
76✔
52
    );
76✔
53
  },
76✔
54
);
2✔
55
Button.displayName = "Button";
2✔
56

2✔
57
export { Button, buttonVariants };
2✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc