diff --git a/src/app/_components/CreateGameForm.tsx b/src/app/_components/CreateGameForm.tsx index e140030..1ef7c02 100644 --- a/src/app/_components/CreateGameForm.tsx +++ b/src/app/_components/CreateGameForm.tsx @@ -2,6 +2,13 @@ import { createGameRoom } from "@/actions/createGameRoom"; import { Button } from "@/components/ui/button"; +import { + Card, + CardContent, + CardFooter, + CardHeader, + CardTitle, +} from "@/components/ui/card"; import { cn } from "@/lib/utils"; import { Loader2, Play } from "lucide-react"; import { useFormStatus } from "react-dom"; @@ -14,7 +21,7 @@ function CreateGameButton() { type="submit" aria-disabled={pending} className={cn( - "bg-green-500 hover:bg-green-500/90", + "w-full bg-green-500 hover:bg-green-500/90", pending && "opacity-50" )} > @@ -34,8 +41,15 @@ function CreateGameButton() { export function CreateGameForm() { return ( -
- - + + + Create Game + + +
+ + +
+
); } diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx new file mode 100644 index 0000000..afa13ec --- /dev/null +++ b/src/components/ui/card.tsx @@ -0,0 +1,79 @@ +import * as React from "react" + +import { cn } from "@/lib/utils" + +const Card = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)) +Card.displayName = "Card" + +const CardHeader = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)) +CardHeader.displayName = "CardHeader" + +const CardTitle = React.forwardRef< + HTMLParagraphElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +

+)) +CardTitle.displayName = "CardTitle" + +const CardDescription = React.forwardRef< + HTMLParagraphElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +

+)) +CardDescription.displayName = "CardDescription" + +const CardContent = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +

+)) +CardContent.displayName = "CardContent" + +const CardFooter = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)) +CardFooter.displayName = "CardFooter" + +export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }