Skip to content

Commit f9aa7b1

Browse files
author
marcoDmc
committed
style: adding responsiveness
1 parent eaf21e3 commit f9aa7b1

File tree

4 files changed

+55
-13
lines changed

4 files changed

+55
-13
lines changed

src/components/Alert/Alert.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const Alert = (props: IAlert) => {
77
return (
88
<Card className="p-3 flex gap-3 border-zinc-200 border-[1px] rounded-md select-none w-full items-center text-justify">
99
<div>{startAdornment}</div>
10-
<span className="text-sm text-zinc-600">{description}</span>
10+
<span className="text-sm text-zinc-600 max-sm:text-center">{description}</span>
1111
</Card>
1212
);
1313
};

src/components/Footer/Footer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const Footer = React.forwardRef<
1717
className
1818
)}
1919
>
20-
<p className="text-white">
20+
<p className="text-white max-sm:grid max-sm:place-items-center transition-all">
2121
Para cadastrar novos abrigos clique{' '}
2222
<a
2323
href="https://forms.gle/2S7L2gR529Dc8P3T9"
@@ -28,7 +28,7 @@ const Footer = React.forwardRef<
2828
</a>
2929
</p>
3030
<span className="text-white hidden md:block"></span>
31-
<span className="text-white flex flex-nowrap gap-2 items-center">
31+
<span className="text-white flex flex-nowrap gap-2 items-center max-sm:grid max-sm:place-items-center transition-all">
3232
Projeto Open Source disponível em{' '}
3333
<a
3434
className="underline hover:text-gray-300 flex"

src/components/Header/Header.tsx

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react';
2-
32
import { IHeader } from './types';
43
import { cn } from '@/lib/utils';
54

@@ -15,21 +14,64 @@ const Header = React.forwardRef<HTMLDivElement, IHeader>((props, ref) => {
1514
} = props;
1615

1716
return (
18-
<div
17+
<header
1918
ref={ref}
2019
className={cn(
21-
'bg-red-600 flex h-[56px] justify-between items-center text-white p-3 gap-2 w-full',
20+
'bg-red-600 overflow-hidden flex min-h-[56px] justify-between items-center text-white p-3 gap-2 w-full',
2221
className
2322
)}
2423
{...rest}
2524
>
26-
<div className="flex gap-1 items-center">
25+
<div className="flex w-full max-w-42 h-full">
2726
{startAdornment}
28-
<h3 className="font-medium text-white">{title}</h3>
29-
</div>
30-
<div className="flex items-center">
31-
<div className="cursor-pointer ">{endAdornment}</div>
27+
<h3 className="font-medium
28+
w-auto
29+
h-full
30+
max-sm:truncate
31+
max-sm:text-wrap
32+
text-white flex
33+
items-center
34+
justify-start
35+
max-sm:text-sm
36+
">{title}</h3>
3237
</div>
38+
{statusHamburguer ? <div className='transition-all ease-linear flex justify-between items-center w-auto
39+
max-sm:w-full
40+
max-sm:max-w-72
41+
max-sm:absolute
42+
max-sm:top-0
43+
max-sm:right-0
44+
h-full
45+
rounded-tl-lg
46+
max-sm:bg-red-500
47+
max-sm:z-10
48+
'>
49+
50+
<div className="flex
51+
items-center
52+
h-full
53+
w-full
54+
max-sm:grid
55+
max-sm:place-items-center
56+
max-sm:pt-5
57+
max-sm:pl-5
58+
">
59+
<div className="cursor-pointer">{endAdornment}</div>
60+
</div>
61+
</div> :
62+
63+
<div className="flex
64+
items-center
65+
h-full
66+
justify-end
67+
w-full
68+
max-sm:hidden
69+
max-sm:place-items-center
70+
max-sm:pt-5
71+
max-sm:pl-5
72+
">
73+
<div className="cursor-pointer">{endAdornment}</div>
74+
</div>
3375

3476
}
3577

@@ -48,7 +90,7 @@ const Header = React.forwardRef<HTMLDivElement, IHeader>((props, ref) => {
4890
{statusHamburguer ? <span className='w-full h-1 rounded transition-all bg-neutral-100 rotate-45 translate-y-2 scale-x-105'></span> : <span className='w-full h-1 rounded bg-neutral-100 transition-all'></span>}
4991
{statusHamburguer ? <span className='hidden transition-all'></span> : <span className='w-full h-1 rounded bg-neutral-100 scale-90 transition-all'></span>}
5092
{statusHamburguer ? <span className='w-full h-1 rounded transition-all bg-neutral-100 -rotate-45 -translate-y-2 scale-110'></span> : <span className='w-full h-1 rounded bg-neutral-100 transition-all'></span>}
51-
</div>
93+
</div>
5294
</header>
5395
);
5496
});

src/pages/Home/components/ShelterListView/ShelterListView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const ShelterListView = React.forwardRef<HTMLDivElement, IShelterListViewProps>(
3333

3434
return (
3535
<div className={cn(className, 'flex flex-col gap-2')}>
36-
<h1 className="text-[#2f2f2f] font-semibold text-2xl">
36+
<h1 className="text-[#2f2f2f] font-semibold text-2xl max-sm:text-center">
3737
Abrigos disponíveis ({count})
3838
</h1>
3939
<Alert

0 commit comments

Comments
 (0)