From 6debf95b8fa272af979d271f6c49a9c95f75ea0d Mon Sep 17 00:00:00 2001 From: Quentin Roussel Date: Wed, 27 Mar 2024 21:22:01 +0100 Subject: [PATCH] added buttons to drawer UI --- traque-front/components/team/actionDrawer.jsx | 43 +++++++++++-------- traque-front/components/util/button.jsx | 14 +++++- traque-front/tailwind.config.js | 1 + 3 files changed, 40 insertions(+), 18 deletions(-) diff --git a/traque-front/components/team/actionDrawer.jsx b/traque-front/components/team/actionDrawer.jsx index 321cecf..14ba843 100644 --- a/traque-front/components/team/actionDrawer.jsx +++ b/traque-front/components/team/actionDrawer.jsx @@ -1,6 +1,6 @@ import useGame from "@/hook/useGame"; import { useState } from "react" -import Button from "../util/button"; +import Button, { GreenButton, RedButton } from "../util/button"; import TextInput from "../util/textInput"; export default function ActionDrawer() { @@ -8,31 +8,40 @@ export default function ActionDrawer() { const { sendCurrentPosition } = useGame(); return ( -
+
setVisible(!visible)} /> {visible &&
-
- -
-
-
- { console.log(i) }} /> +
+
+ 30min + before penalty
-
- -
-
-
-

30min

-

before penalty

-
- +
+ +
+
+ +
+
+ See target info +
+
+
+ { console.log(i) }} /> + Capture target +
+
+
+ Signal emergency +
+
+ Log out
} diff --git a/traque-front/components/util/button.jsx b/traque-front/components/util/button.jsx index 6f25da2..e9559c0 100644 --- a/traque-front/components/util/button.jsx +++ b/traque-front/components/util/button.jsx @@ -1,5 +1,17 @@ export default function Button({ children, ...props }) { - return () +} + +export function RedButton({ children, ...props }) { + return () +} + +export function GreenButton({ children, ...props }) { + return () } \ No newline at end of file diff --git a/traque-front/tailwind.config.js b/traque-front/tailwind.config.js index bfb8aee..a7babb3 100644 --- a/traque-front/tailwind.config.js +++ b/traque-front/tailwind.config.js @@ -1,5 +1,6 @@ /** @type {import('tailwindcss').Config} */ module.exports = { + mode: 'jit', content: [ "./pages/**/*.{js,ts,jsx,tsx,mdx}", "./components/**/*.{js,ts,jsx,tsx,mdx}",