From 5c17f9d9d545704defb99c45fb57ac6495f67cb5 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 24 Nov 2024 19:33:52 +0100 Subject: [PATCH] fix: fix the HTML code for validity --- components/shared/DemoVideo.tsx | 15 +++++---------- components/shared/Hero.tsx | 10 +++++----- components/shared/HeroCards.tsx | 11 ++++++----- components/ui/badge.tsx | 4 ++-- components/ui/button.tsx | 13 +++++++++---- 5 files changed, 27 insertions(+), 26 deletions(-) diff --git a/components/shared/DemoVideo.tsx b/components/shared/DemoVideo.tsx index bb3557e..e65053e 100644 --- a/components/shared/DemoVideo.tsx +++ b/components/shared/DemoVideo.tsx @@ -1,16 +1,11 @@ "use client"; import React from "react"; -import { Button } from "../ui/button"; +import { Button, buttonVariants } from "../ui/button"; import { ArrowUpRight } from "lucide-react"; import Link from "next/link"; -import { useRouter } from "next/navigation"; import HeroVideoDialog from "../ui/heroVideoAction"; const DemoVideo = () => { - const router = useRouter(); - const handleClick = () => { - router.push("/docs"); - }; return (
{

Process of setting up a WordPress website running on SVR.JS.

- + diff --git a/components/shared/Hero.tsx b/components/shared/Hero.tsx index 48583b1..a924bd3 100644 --- a/components/shared/Hero.tsx +++ b/components/shared/Hero.tsx @@ -1,7 +1,7 @@ "use client"; import React, { useState } from "react"; import HeroCards from "./HeroCards"; -import { Button } from "../ui/button"; +import { Button, buttonVariants } from "../ui/button"; import Link from "next/link"; import { Check, Clipboard } from "lucide-react"; import GridPattern from "../ui/grid-pattern"; @@ -63,7 +63,7 @@ const Hero = () => { Expanding server functionality -
+

Host with{" "} @@ -74,7 +74,7 @@ const Hero = () => { ease

-
+

Host reliably and securely, and scale effortlessly with SVR.JS, an open-source and configurable web server running on Node.JS that's @@ -95,8 +95,8 @@ const Hero = () => {

|

or

- - + + Download
{
{cards.pricingCard.description} - - + + {cards.pricingCard.primaryButtonText}
diff --git a/components/ui/badge.tsx b/components/ui/badge.tsx index 1bb83df..87c57b0 100644 --- a/components/ui/badge.tsx +++ b/components/ui/badge.tsx @@ -24,12 +24,12 @@ const badgeVariants = cva( ); export interface BadgeProps - extends React.HTMLAttributes, + extends React.HTMLAttributes, VariantProps {} function Badge({ className, variant, ...props }: BadgeProps) { return ( -
+ ); } diff --git a/components/ui/button.tsx b/components/ui/button.tsx index 7e9af4d..3a09eaa 100644 --- a/components/ui/button.tsx +++ b/components/ui/button.tsx @@ -5,7 +5,7 @@ import { cva, type VariantProps } from "class-variance-authority"; import { cn } from "@/lib/utils"; const buttonVariants = cva( - "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", + "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", { variants: { variant: { @@ -25,11 +25,16 @@ const buttonVariants = cva( lg: "h-11 rounded-md px-8", icon: "h-10 w-10", smicon: "h-8 w-8" + }, + font: { + default: "font-medium", + bold: "font-bold" } }, defaultVariants: { variant: "default", - size: "default" + size: "default", + font: "default" } } ); @@ -41,11 +46,11 @@ export interface ButtonProps } const Button = React.forwardRef( - ({ className, variant, size, asChild = false, ...props }, ref) => { + ({ className, variant, size, font, asChild = false, ...props }, ref) => { const Comp = asChild ? Slot : "button"; return (