From aaff1db2abe3b46dfe81848527fad36386d09dce Mon Sep 17 00:00:00 2001 From: pb-coding <71174645+pb-coding@users.noreply.github.com> Date: Sat, 23 Sep 2023 13:16:15 +0200 Subject: [PATCH] adds tailwindcss --- index.html | 11 +- package-lock.json | 763 +++++++++++++++++++++++++-- package.json | 5 + postcss.config.js | 6 + src/App.tsx | 129 ++--- src/components/ConnectionManager.tsx | 11 +- src/components/ConnectionState.tsx | 6 +- src/components/JoinSession.tsx | 4 +- src/global/Button.tsx | 18 + src/global/Text.tsx | 11 + src/index.css | 4 + tailwind.config.js | 23 + 12 files changed, 871 insertions(+), 120 deletions(-) create mode 100644 postcss.config.js create mode 100644 src/global/Button.tsx create mode 100644 src/global/Text.tsx create mode 100644 tailwind.config.js diff --git a/index.html b/index.html index e4b78ea..79cc5f9 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,12 @@ - +
+{messageDispaly}
} +Player ID: {playerData.id}
-Player Name: {playerData.name}
-Player Round Points: {playerData.roundPoints}
-Player Total Points: {playerData.totalPoints}
-| Column 1 | -Column 2 | -Column 3 | -Column 4 | -
|---|---|---|---|
|
- {card && (
- |
- );
- })}
-
############### OLD INTERFACE ###############
- {messageDispaly && messageDispaly !== "" &&{messageDispaly}
} -Player ID: {playerData.id}
+Player Name: {playerData.name}
+Player Round Points: {playerData.roundPoints}
+Player Total Points: {playerData.totalPoints}
+| Column 1 | +Column 2 | +Column 3 | +Column 4 | +
|---|---|---|---|
|
+ {card && (
+ |
+ );
+ })}
+
+
Session: {session}
Players: {clientsInRoom}
SocketId: {socket.id}
-
{children}
; +}; + +export default Text; diff --git a/src/index.css b/src/index.css index 293d3b1..76ee4ca 100644 --- a/src/index.css +++ b/src/index.css @@ -1,3 +1,7 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + body { margin: 0; } diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..cd3eee3 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,23 @@ +/** @type {import('tailwindcss').Config} */ +export default { + content: [ + "./pages/**/*.{js,ts,jsx,tsx,mdx}", + "./components/**/*.{js,ts,jsx,tsx,mdx}", + "./app/**/*.{js,ts,jsx,tsx,mdx}", + "./node_modules/flowbite-react/**/*.js", + ], + theme: { + extend: { + backgroundImage: { + "gradient-radial": "radial-gradient(var(--tw-gradient-stops))", + "gradient-conic": + "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))", + }, + opacity: { + 95: "0.95", + }, + }, + }, + plugins: [import("flowbite/plugin")], + darkMode: "class", +};