From 6f3c668c2f985987dc50de48798d31c671019256 Mon Sep 17 00:00:00 2001 From: Abi Raja Date: Wed, 15 Nov 2023 13:11:41 -0500 Subject: [PATCH] add shadcn and some components --- frontend/components.json | 16 + frontend/package.json | 7 + frontend/src/App.tsx | 40 +- frontend/src/components/ui/button.tsx | 57 +++ frontend/src/components/ui/textarea.tsx | 24 + frontend/src/index.css | 93 +++- frontend/tailwind.config.js | 74 ++- frontend/tsconfig.json | 7 +- frontend/vite.config.ts | 6 + frontend/yarn.lock | 632 +++++++++++++----------- 10 files changed, 626 insertions(+), 330 deletions(-) create mode 100644 frontend/components.json create mode 100644 frontend/src/components/ui/button.tsx create mode 100644 frontend/src/components/ui/textarea.tsx diff --git a/frontend/components.json b/frontend/components.json new file mode 100644 index 0000000..88a9a6e --- /dev/null +++ b/frontend/components.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": false, + "tsx": true, + "tailwind": { + "config": "tailwind.config.js", + "css": "src/index.css", + "baseColor": "slate", + "cssVariables": true + }, + "aliases": { + "components": "@/components", + "utils": "@/lib/utils" + } +} \ No newline at end of file diff --git a/frontend/package.json b/frontend/package.json index 18913b8..0716eee 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -10,15 +10,22 @@ "preview": "vite preview" }, "dependencies": { + "@radix-ui/react-icons": "^1.3.0", + "@radix-ui/react-slot": "^1.0.2", + "class-variance-authority": "^0.7.0", "classnames": "^2.3.2", + "clsx": "^2.0.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-dropzone": "^14.2.3", "react-hot-toast": "^2.4.1", "react-icons": "^4.12.0", + "tailwind-merge": "^2.0.0", + "tailwindcss-animate": "^1.0.7", "vite-plugin-checker": "^0.6.2" }, "devDependencies": { + "@types/node": "^20.9.0", "@types/react": "^18.2.15", "@types/react-dom": "^18.2.7", "@typescript-eslint/eslint-plugin": "^6.0.0", diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 632b5d8..ce8d481 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -6,6 +6,8 @@ import { generateCode } from "./generateCode"; import Spinner from "./components/Spinner"; import classNames from "classnames"; import { FaDownload, FaUndo } from "react-icons/fa"; +import { Button } from "@/components/ui/button"; +import { Textarea } from "@/components/ui/textarea"; function App() { const [appState, setAppState] = useState<"INITIAL" | "CODING" | "CODE_READY">( @@ -99,24 +101,30 @@ function App() { {appState === "CODE_READY" && ( -
- + - Download - - + onClick={reset} + > + + Reset + +
+
+