Skip to content

Commit 04bc259

Browse files
refactor(icons/quiz): set display names
1 parent 655a434 commit 04bc259

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import { IconBase, type IconType } from "react-icons/lib"
1+
import { IconBase, type IconBaseProps } from "react-icons/lib"
22

33
import { cn } from "@/lib/utils/cn"
44

5-
export const CorrectIcon: IconType = ({ className, ...props }) => (
5+
export const CorrectIcon = ({ className, ...props }: IconBaseProps) => (
66
<IconBase viewBox="0 0 20 16" className={cn(className, "h-4 w-5")} {...props}>
77
<path d="M8 16L0 9.05375L2.75437 7.06313L7.49875 11.4325L16.8531 0L20 2L8 16Z" />
88
</IconBase>
99
)
10+
11+
CorrectIcon.displayName = "CorrectIcon"
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import { IconBase, type IconType } from "react-icons/lib"
1+
import { IconBase, type IconBaseProps } from "react-icons/lib"
22

33
import { cn } from "@/lib/utils/cn"
44

5-
export const IncorrectIcon: IconType = ({ className, ...props }) => (
5+
export const IncorrectIcon = ({ className, ...props }: IconBaseProps) => (
66
<IconBase className={cn(className, "size-5")} viewBox="0 0 20 20" {...props}>
77
<path d="M17.5002 0L9.99912 7.49934L2.49978 0L0 2.49978L7.49934 9.99911L0 17.4984L2.49978 19.9982L9.99912 12.4989L17.5002 19.9982L20 17.4984L12.5007 9.99911L20 2.49978L17.5002 0Z" />
88
</IconBase>
99
)
10+
11+
IncorrectIcon.displayName = "IncorrectIcon"

src/components/icons/quiz/StarConfettiIcon.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
/* eslint-disable react/jsx-key */
22
import React from "react"
3-
import { IconBase, type IconType } from "react-icons"
3+
import { IconBase } from "react-icons"
4+
import type { IconBaseProps } from "react-icons/lib"
45

56
import { cn } from "@/lib/utils/cn"
67

7-
export const StarConfettiIcon: IconType = ({ className, ...props }) => (
8+
export const StarConfettiIcon = ({ className, ...props }: IconBaseProps) => (
89
<IconBase
910
viewBox="0 0 185 119"
1011
className={cn(className, "h-[119px] w-[185px]")}
@@ -104,3 +105,5 @@ export const StarConfettiIcon: IconType = ({ className, ...props }) => (
104105
/>
105106
</IconBase>
106107
)
108+
109+
StarConfettiIcon.displayName = "StarConfettiIcon"

src/components/icons/quiz/TrophyIcon.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { IconBase, type IconType } from "react-icons/lib"
1+
import { IconBase, type IconBaseProps } from "react-icons/lib"
22

33
import { cn } from "@/lib/utils/cn"
44

55
import { commonIconDefaultProps } from "../utils"
66

7-
export const TrophyIcon: IconType = ({ className, ...props }) => (
7+
export const TrophyIcon = ({ className, ...props }: IconBaseProps) => (
88
<IconBase
99
className={cn("size-7", className)}
1010
viewBox="0 0 28 28"
@@ -15,3 +15,5 @@ export const TrophyIcon: IconType = ({ className, ...props }) => (
1515
<path d="M27.0563 7.06952V3.59118C27.0563 1.67722 25.4963 0.982422 24.4476 0.982422H3.57751C2.52879 0.982422 0.96875 1.67722 0.96875 3.59118V7.06952C0.96875 9.85567 2.73662 11.874 5.35755 12.2262C5.71234 16.0671 8.56197 19.1855 12.2734 19.9385V21.8525H10.5342C10.0559 21.8525 9.6646 22.2438 9.6646 22.7221V24.4612H18.3605V22.7221C18.3605 22.2438 17.9691 21.8525 17.4909 21.8525H15.7517V19.9385C19.4631 19.1846 22.3127 16.0671 22.6675 12.2262C25.2884 11.874 27.0563 9.85567 27.0563 7.06952ZM3.57751 2.72159H5.31668V10.4539C3.70968 10.1252 2.70792 8.87391 2.70792 7.06952V3.59118C2.70792 2.89116 3.18619 2.73203 3.57751 2.72159ZM24.4371 2.72159C24.8389 2.73203 25.3171 2.89116 25.3171 3.59118V7.06952C25.3171 8.87391 24.3154 10.1252 22.7084 10.4539V2.72159H24.4371ZM15.6624 7.33275L14.5257 5.0309C14.3266 4.62772 13.7514 4.62772 13.5526 5.0309L12.4159 7.33275C12.3368 7.49284 12.184 7.60378 12.0072 7.62941L9.46532 7.99855C9.02005 8.06305 8.84241 8.60973 9.16448 8.92362L11.0038 10.7153C11.1316 10.8399 11.19 11.0196 11.1598 11.1954L10.7256 13.7254C10.6495 14.1685 11.115 14.5066 11.5131 14.2973L13.7865 13.1029C13.9446 13.0199 14.1336 13.0199 14.2917 13.1029L16.5651 14.2973C16.9633 14.5064 17.4287 14.1685 17.3526 13.7254L16.9185 11.1954C16.8882 11.0196 16.9467 10.8399 17.0745 10.7153L18.9138 8.92362C19.2359 8.60994 19.0582 8.06326 18.613 7.99855L16.0711 7.62941C15.8943 7.60378 15.7415 7.49284 15.6624 7.33275Z" />
1616
</IconBase>
1717
)
18+
19+
TrophyIcon.displayName = "TrophyIcon"

0 commit comments

Comments
 (0)