File tree Expand file tree Collapse file tree 1 file changed +7
-27
lines changed
src/components/Nav/Mobile Expand file tree Collapse file tree 1 file changed +7
-27
lines changed Original file line number Diff line number Diff line change 1
- import { motion } from "framer-motion"
2
-
3
- const expandedPathVariants = {
4
- closed : {
5
- d : "M12 7.875V17.125" ,
6
- transition : { duration : 0.1 } ,
7
- } ,
8
- open : {
9
- d : "M12 12V12" ,
10
- transition : { duration : 0.1 } ,
11
- } ,
12
- }
1
+ import { Minus , Plus } from "lucide-react"
13
2
14
3
type ExpandIconProps = {
15
4
isOpen : boolean
16
5
}
17
6
18
- const ExpandIcon = ( { isOpen } : ExpandIconProps ) => (
19
- < svg
20
- viewBox = "0 0 24 25"
21
- className = "relative inline-block h-6 w-6 stroke-current stroke-2 group-hover:text-primary-hover"
22
- >
23
- < motion . path
24
- variants = { expandedPathVariants }
25
- initial = { false }
26
- animate = { isOpen ? "open" : "closed" }
27
- d = "M12 7.875V17.125"
28
- stroke-width = "2"
29
- />
30
- < path d = "M7.375 12.5L16.625 12.5" stroke-width = "2" />
31
- </ svg >
32
- )
7
+ const ExpandIcon = ( { isOpen } : ExpandIconProps ) =>
8
+ isOpen ? (
9
+ < Minus className = "size-6 stroke-[3] p-1 group-hover:text-primary-hover" />
10
+ ) : (
11
+ < Plus className = "size-6 stroke-[3] p-1 group-hover:text-primary-hover" />
12
+ )
33
13
34
14
export default ExpandIcon
You can’t perform that action at this time.
0 commit comments