Skip to content

Commit 6713bbb

Browse files
committed
made components responsive
1 parent 223309c commit 6713bbb

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

components/Form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const Form = ({ setFormData }: any) => {
2727
const renderForm = () => {
2828
return (
2929
<form
30-
className="w-[350px] min-h-[350px] text-xl flex flex-col justify-start items-center"
30+
className="w-[350px] min-h-[350px] text-xl flex flex-col justify-start items-center max-[500px]:w-[300px]"
3131
onSubmit={(e) => {
3232
e.preventDefault()
3333
}}

components/GetForm.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const GetForm = ({ roomCode }: RoomCode) => {
2424
})
2525

2626
const checkFields = () => {
27-
if(formData.name == '') setShowError(true);
27+
if(formData.name === '') setShowError(true);
2828
else {
2929
setShowError(false)
3030
router.push(`/${roomCode}/result`)
@@ -34,24 +34,24 @@ const GetForm = ({ roomCode }: RoomCode) => {
3434
console.log(formData)
3535

3636
return (
37-
<div className="w-screen min-h-screen flex flex-col justify-center items-center text-white py-[70px]">
37+
<div className="w-screen min-h-screen flex flex-col justify-center items-center text-white pb-[70px] pt-[90px]">
3838
<Navbar />
3939

40-
<div className="relative w-fit border-2 border-white ml-6 p-8 rounded-2xl flex justify-start items-start bg-[#16161a]">
40+
<div className="relative w-fit border-2 border-white ml-6 p-8 rounded-2xl flex justify-start items-start bg-[#16161a] max-[985px]:flex-col max-[500px]:p-4 max-[500px]:ml-0 max-[500px]:py-8">
4141
<div>
4242
<p className="text-2xl text-[#d4d4d4] mb-[20px]">Room Code: {roomCode}</p>
4343

4444
<Form setFormData={setFormData} />
4545
</div>
4646

47-
<div className="mt-[20px] ml-[20px]">
47+
<div className="mt-[20px] ml-[20px] max-[985px]:hidden">
4848
<iframe
4949
className="border-none w-[450px] h-[275px] z-[-1]"
5050
src={svgSrc}
5151
></iframe>
5252
</div>
5353

54-
<div className="absolute bottom-0 right-0 m-8 mb-[42px] flex gap-6">
54+
<div className="absolute bottom-0 right-0 m-8 mb-[42px] flex gap-6 max-[985px]:relative max-[985px]:my-0 max-[985px]:mx-auto">
5555
<button className="py-2 px-5 border-[3px] border-white rounded-lg text-xl font-medium hover:font-semibold hover:border-[#48d399] hover:text-[#48d399]"
5656
onClick={() => checkFields()}
5757
>

components/LandingPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const LandingPage = () => {
1313
Get Intervals
1414
</h1>
1515

16-
<p className="text-xl">
16+
<p className="text-xl text-center">
1717
Unite Your Free Time: Find Common Slots Together!
1818
</p>
1919

components/ListIntervals.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const ListIntervals = ({ addInterval, removeInterval, setFormData }: any) => {
4949

5050
<div
5151
id="interval"
52-
className="flex justify-center items-center gap-[10px]"
52+
className="relative flex justify-center items-center gap-[10px] max-[500px]:mb-[40px]"
5353
>
5454
<input
5555
type="time"
@@ -69,7 +69,9 @@ const ListIntervals = ({ addInterval, removeInterval, setFormData }: any) => {
6969
className={`border-2 border-white text-black text-[24px] font-semibold rounded-lg py-[3px] px-4 m-1 focus:outline focus:outline-2 focus:outline-[#48d399] focus:border-[#48d399] focus:bg-transparent focus:text-white ${rajdhani.className}`}
7070
/>
7171

72-
<div>
72+
<div
73+
className='flex max-[500px]:absolute max-[500px]:-bottom-full'
74+
>
7375
<button
7476
className="w-[35px] h-[35px] rounded-[25px] ml-[20px]"
7577
onClick={() => addInterval()}
@@ -101,7 +103,7 @@ const ListIntervals = ({ addInterval, removeInterval, setFormData }: any) => {
101103
</div>
102104

103105
{errorMsg != '' ? (
104-
<p className="font-medium text-[#db696d]">{errorMsg}</p>
106+
<p className="text-center font-medium text-[#db696d] max-[500px]:mt-[20px]">{errorMsg}</p>
105107
) : (
106108
<></>
107109
)}

components/Results.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const Results = ({ roomCode }: RoomCode) => {
5151
Members Info
5252
</p>
5353

54-
<div className="max-w[1200px] grid grid-flow-row grid-cols-3 justify-center items-start gap-[70px]">
54+
<div className="max-w[1200px] grid grid-flow-row grid-cols-1 md:grid-cols-2 lg:grid-cols-3 justify-center items-start gap-[70px]">
5555
{membersData.map((values: MemberData, id: number) => (
5656
<MemberInfo
5757
name={values.name}

0 commit comments

Comments
 (0)