Skip to content

Commit 45790bd

Browse files
committed
update: use Lucide Plus/Minus for ExpandIcon
1 parent 5fefd01 commit 45790bd

File tree

1 file changed

+7
-27
lines changed

1 file changed

+7
-27
lines changed
Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,14 @@
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"
132

143
type ExpandIconProps = {
154
isOpen: boolean
165
}
176

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+
)
3313

3414
export default ExpandIcon

0 commit comments

Comments
 (0)