1
1
import React from 'react' ;
2
-
3
2
import { IHeader } from './types' ;
4
3
import { cn } from '@/lib/utils' ;
5
4
@@ -15,21 +14,64 @@ const Header = React.forwardRef<HTMLDivElement, IHeader>((props, ref) => {
15
14
} = props ;
16
15
17
16
return (
18
- < div
17
+ < header
19
18
ref = { ref }
20
19
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' ,
22
21
className
23
22
) }
24
23
{ ...rest }
25
24
>
26
- < div className = "flex gap-1 items-center " >
25
+ < div className = "flex w-full max-w-42 h-full " >
27
26
{ 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 >
32
37
</ 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 >
33
75
34
76
}
35
77
@@ -48,7 +90,7 @@ const Header = React.forwardRef<HTMLDivElement, IHeader>((props, ref) => {
48
90
{ 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 > }
49
91
{ statusHamburguer ? < span className = 'hidden transition-all' > </ span > : < span className = 'w-full h-1 rounded bg-neutral-100 scale-90 transition-all' > </ span > }
50
92
{ 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 >
52
94
</ header >
53
95
) ;
54
96
} ) ;
0 commit comments