From 1c5845acce0deaf43ab4115561e86bcf8f115c11 Mon Sep 17 00:00:00 2001 From: skiende74 Date: Tue, 24 Sep 2024 03:46:30 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20lang=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- a11y/index.html | 36 +++++++++++++++++++++------------- a11y/src/App.tsx | 8 ++++---- a11y/tsconfig.app.tsbuildinfo | 1 + a11y/tsconfig.node.tsbuildinfo | 1 + 4 files changed, 28 insertions(+), 18 deletions(-) create mode 100644 a11y/tsconfig.app.tsbuildinfo create mode 100644 a11y/tsconfig.node.tsbuildinfo diff --git a/a11y/index.html b/a11y/index.html index 12fa3e7..04ce8f0 100644 --- a/a11y/index.html +++ b/a11y/index.html @@ -1,16 +1,24 @@ - - - - - - - - Accessibility - - - -
- - + + + + + + + Accessibility + + +
+ + diff --git a/a11y/src/App.tsx b/a11y/src/App.tsx index a8159f9..b8fecc8 100644 --- a/a11y/src/App.tsx +++ b/a11y/src/App.tsx @@ -6,11 +6,11 @@ import FlightBooking from "./components/FlightBooking"; function App() { return (
-
-
+
+
-
-
+ +
); } diff --git a/a11y/tsconfig.app.tsbuildinfo b/a11y/tsconfig.app.tsbuildinfo new file mode 100644 index 0000000..6a63756 --- /dev/null +++ b/a11y/tsconfig.app.tsbuildinfo @@ -0,0 +1 @@ +{"root":["./src/app.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/components/flightbooking.tsx"],"version":"5.6.2"} \ No newline at end of file diff --git a/a11y/tsconfig.node.tsbuildinfo b/a11y/tsconfig.node.tsbuildinfo new file mode 100644 index 0000000..98ef2f9 --- /dev/null +++ b/a11y/tsconfig.node.tsbuildinfo @@ -0,0 +1 @@ +{"root":["./vite.config.ts"],"version":"5.6.2"} \ No newline at end of file From 5ee37a3d8e12fc10f7a394a0c4a7d4e5e073dde9 Mon Sep 17 00:00:00 2001 From: skiende74 Date: Tue, 24 Sep 2024 04:04:03 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=ED=95=AD=EA=B3=B5=EA=B6=8C=20?= =?UTF-8?q?=EC=98=88=EB=A7=A4=20=ED=81=B4=EB=A6=AD=EC=8B=9C=201~3=EB=AA=85?= =?UTF-8?q?=20=EA=B9=8C=EC=A7=80=EB=A7=8C=20=EB=8A=98=EB=A6=B4=EC=88=98=20?= =?UTF-8?q?=EC=9E=88=EA=B2=8C=20=ED=95=98=EB=A9=B0,=20=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A6=B0=20=EB=A6=AC=EB=8D=94=EB=A1=9C=20=EC=9D=B4=EC=9A=A9?= =?UTF-8?q?=ED=95=A0=20=EC=88=98=20=EC=9E=88=EA=B2=8C=ED=95=9C=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- a11y/src/components/FlightBooking.css | 9 ++++-- a11y/src/components/FlightBooking.tsx | 40 ++++++++++++++++++++++----- 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/a11y/src/components/FlightBooking.css b/a11y/src/components/FlightBooking.css index d9d6083..06ae7cf 100644 --- a/a11y/src/components/FlightBooking.css +++ b/a11y/src/components/FlightBooking.css @@ -34,7 +34,7 @@ width: 30px; height: 30px; border-radius: 16px; - border: 1px solid #C0C0C0; + border: 1px solid #c0c0c0; background-color: #fff; cursor: pointer; display: flex; @@ -45,13 +45,18 @@ .counter span { font-size: 18px; text-align: center; - font-size: 18px; font-style: normal; font-weight: 500; line-height: normal; padding: 0 16px; } +.help-text { + padding-bottom: 10px; + line-height: normal; + text-align: center; +} + .search-button { width: 100%; padding: 10px; diff --git a/a11y/src/components/FlightBooking.tsx b/a11y/src/components/FlightBooking.tsx index 313cab3..37cb2f2 100644 --- a/a11y/src/components/FlightBooking.tsx +++ b/a11y/src/components/FlightBooking.tsx @@ -3,35 +3,61 @@ import { useState } from "react"; import "./FlightBooking.css"; const MAX_PASSENGERS = 3; - +const MIN_PASSENGERS = 1; const FlightBooking = () => { - const [adultCount, setAdultCount] = useState(1); + const [adultCount, setAdultCount] = useState(MIN_PASSENGERS); + const [helpMessage, setHelpMessage] = useState(""); const incrementCount = () => { + if (adultCount == MAX_PASSENGERS) { + setHelpMessage(`최대 승객 수는 ${MAX_PASSENGERS}명 입니다.`); + return; + } setAdultCount((prev) => Math.min(MAX_PASSENGERS, prev + 1)); + setHelpMessage(""); }; const decrementCount = () => { + if (adultCount == MIN_PASSENGERS) { + setHelpMessage(`최소 승객 수는 ${MIN_PASSENGERS}명 입니다.`); + return; + } setAdultCount((prev) => Math.max(1, prev - 1)); + setHelpMessage(""); }; return ( -
+

항공권 예매

성인
- - {adultCount} -
+
+ {helpMessage} +
-
+ ); }; From c27262433a31041a9c79fc4149125a1edb1e8511 Mon Sep 17 00:00:00 2001 From: skiende74 Date: Tue, 24 Sep 2024 04:19:13 +0900 Subject: [PATCH 3/3] style:renormalize eol --- a11y/tsconfig.app.tsbuildinfo | 10 +++++++++- a11y/tsconfig.node.tsbuildinfo | 7 ++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/a11y/tsconfig.app.tsbuildinfo b/a11y/tsconfig.app.tsbuildinfo index 6a63756..a0b73bc 100644 --- a/a11y/tsconfig.app.tsbuildinfo +++ b/a11y/tsconfig.app.tsbuildinfo @@ -1 +1,9 @@ -{"root":["./src/app.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/components/flightbooking.tsx"],"version":"5.6.2"} \ No newline at end of file +{ + "root": [ + "./src/app.tsx", + "./src/main.tsx", + "./src/vite-env.d.ts", + "./src/components/flightbooking.tsx" + ], + "version": "5.6.2" +} diff --git a/a11y/tsconfig.node.tsbuildinfo b/a11y/tsconfig.node.tsbuildinfo index 98ef2f9..6f7f83a 100644 --- a/a11y/tsconfig.node.tsbuildinfo +++ b/a11y/tsconfig.node.tsbuildinfo @@ -1 +1,6 @@ -{"root":["./vite.config.ts"],"version":"5.6.2"} \ No newline at end of file +{ + "root": [ + "./vite.config.ts" + ], + "version": "5.6.2" +}