Skip to content

Instantly share code, notes, and snippets.

View felipemotarocha's full-sized avatar

Felipe Rocha felipemotarocha

View GitHub Profile
@felipemotarocha
felipemotarocha / Button.tsx
Last active October 16, 2023 11:35
[FSW] Aula #2 - Componentes
import { ComponentPropsWithoutRef } from "react";
import { twMerge } from "tailwind-merge";
function Button({ className, ...props }: ComponentPropsWithoutRef<"button">) {
const _className = twMerge(
className,
"appearance-none rounded-lg bg-primary p-2 text-sm font-medium text-white shadow transition-all hover:bg-primaryDarker"
);
return (
const { PrismaClient } = require("@prisma/client");
const prisma = new PrismaClient();
async function main() {
try {
const mousesCategory = await prisma.category.create({
data: {
name: "Mouses",
slug: "mouses",
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--background: 0 0% 4%;
--foreground: 0 0% 100%;
--card: 0 0% 4%;
import { PrismaClient } from "@prisma/client";
declare global {
var cachedPrisma: PrismaClient;
}
let prisma: PrismaClient;
if (process.env.NODE_ENV === "production") {
prisma = new PrismaClient();
} else {