From 6b77f009db5b899688c17201678791b972188857 Mon Sep 17 00:00:00 2001 From: Frost Date: Sun, 8 Sep 2024 06:26:25 +0800 Subject: [PATCH] add initial set up for react --- src/App.jsx | 20 ++++++++++++++++++++ src/index.css | 11 +++++++++++ src/main.jsx | 10 ++++++++++ 3 files changed, 41 insertions(+) create mode 100644 src/App.jsx create mode 100644 src/index.css create mode 100644 src/main.jsx diff --git a/src/App.jsx b/src/App.jsx new file mode 100644 index 0000000..e20cb64 --- /dev/null +++ b/src/App.jsx @@ -0,0 +1,20 @@ +import { BrowserRouter, Route, Routes } from "react-router-dom"; +import CountryInfoApp from "./components/countryInfoApp"; +import CountryList from "./components/countryList" +import CountryDetails from "./components/countryDetails"; + +function App() { + return ( + <> + + + }> + } /> + }/> + + + + + ); +} +export default App; diff --git a/src/index.css b/src/index.css new file mode 100644 index 0000000..d07ec7e --- /dev/null +++ b/src/index.css @@ -0,0 +1,11 @@ +@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap"); + +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer base { + body { + @apply bg-lightBackground dark:bg-darkPrimary font-mainFont + } +} \ No newline at end of file diff --git a/src/main.jsx b/src/main.jsx new file mode 100644 index 0000000..89f91e5 --- /dev/null +++ b/src/main.jsx @@ -0,0 +1,10 @@ +import { StrictMode } from 'react' +import { createRoot } from 'react-dom/client' +import App from './App.jsx' +import './index.css' + +createRoot(document.getElementById('root')).render( + + + , +)