Skip to content

Commit 6bf9c3f

Browse files
author
marcoDmc
committed
style: removed unused code
1 parent 6b3010e commit 6bf9c3f

File tree

1 file changed

+5
-73
lines changed

1 file changed

+5
-73
lines changed

src/components/Header/Header.tsx

Lines changed: 5 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import React from 'react';
22
import { IHeader } from './types';
33
import { cn } from '@/lib/utils';
44

@@ -12,11 +12,6 @@ const Header = React.forwardRef<HTMLDivElement, IHeader>((props, ref) => {
1212
} = props;
1313

1414

15-
16-
17-
const [statusHamburguer, setStatus] = useState(false)
18-
const handleStatusHamburguer = () => setStatus(prev => !prev)
19-
2015
return (
2116
<header
2217
ref={ref}
@@ -26,75 +21,12 @@ const Header = React.forwardRef<HTMLDivElement, IHeader>((props, ref) => {
2621
)}
2722
{...rest}
2823
>
29-
<div className="flex w-full max-w-42 h-full">
24+
<div className="flex gap-1 items-center">
3025
{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>
4227
</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>
9830
</div>
9931
</header>
10032
);

0 commit comments

Comments
 (0)