1
- import React , { useState } from 'react' ;
1
+ import React from 'react' ;
2
2
import { IHeader } from './types' ;
3
3
import { cn } from '@/lib/utils' ;
4
4
@@ -12,11 +12,6 @@ const Header = React.forwardRef<HTMLDivElement, IHeader>((props, ref) => {
12
12
} = props ;
13
13
14
14
15
-
16
-
17
- const [ statusHamburguer , setStatus ] = useState ( false )
18
- const handleStatusHamburguer = ( ) => setStatus ( prev => ! prev )
19
-
20
15
return (
21
16
< header
22
17
ref = { ref }
@@ -26,75 +21,12 @@ const Header = React.forwardRef<HTMLDivElement, IHeader>((props, ref) => {
26
21
) }
27
22
{ ...rest }
28
23
>
29
- < div className = "flex w-full max-w-42 h-full " >
24
+ < div className = "flex gap-1 items-center " >
30
25
{ startAdornment }
31
- < h3 className = "font-medium
32
- w-auto
33
- h-full
34
- max-sm:truncate
35
- max-sm:text-wrap
36
- text-white flex
37
- items-center
38
- justify-start
39
- text-nowrap
40
- max-sm:text-sm
41
- " > { title } </ h3 >
26
+ < h3 className = "font-medium text-white" > { title } </ h3 >
42
27
</ div >
43
- { statusHamburguer ? < div className = 'transition-all ease-linear flex justify-between items-center w-auto
44
- max-sm:w-full
45
- max-sm:max-w-72
46
- max-sm:absolute
47
- max-sm:top-0
48
- max-sm:right-0
49
- h-full
50
- rounded-tl-lg
51
- max-sm:bg-red-500
52
- max-sm:z-10
53
- ' >
54
-
55
- < div className = "flex
56
- items-center
57
- h-full
58
- w-full
59
- max-sm:grid
60
- max-sm:place-items-center
61
- max-sm:pt-5
62
- max-sm:pl-5
63
- " >
64
- < div className = "cursor-pointer" > { endAdornment } </ div >
65
- </ div >
66
- </ div > :
67
-
68
- < div className = "flex
69
- items-center
70
- h-full
71
- justify-end
72
- w-full
73
- max-sm:hidden
74
- max-sm:place-items-center
75
- max-sm:pt-5
76
- max-sm:pl-5
77
- " >
78
- < div className = "cursor-pointer" > { endAdornment } </ div >
79
- </ div >
80
-
81
- }
82
-
83
- < div className = '
84
- absolute top-2 right-4
85
- w-full max-w-10
86
- h-full max-h-10
87
- hidden
88
- max-sm:grid
89
- place-items-center
90
- p-1
91
- cursor-pointer
92
- z-0
93
- max-sm:z-20
94
- ' onClick = { handleStatusHamburguer } >
95
- { 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 > }
96
- { statusHamburguer ? < span className = 'hidden transition-all' > </ span > : < span className = 'w-full h-1 rounded bg-neutral-100 scale-90 transition-all' > </ span > }
97
- { 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 > }
28
+ < div className = "flex w-auto items-center justify-between" >
29
+ < div className = "cursor-pointer" > { endAdornment } </ div >
98
30
</ div >
99
31
</ header >
100
32
) ;
0 commit comments