Skip to content

Commit 227a49b

Browse files
committed
fix: chromatic svg/icon regressions
1 parent 34219f1 commit 227a49b

File tree

10 files changed

+52
-26
lines changed

10 files changed

+52
-26
lines changed

src/components/ListenToPlayer/PlayerWidget/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ const PlayerWidget = ({
160160
})
161161
}}
162162
>
163-
<Minimize2 className="stroke-1" />
163+
<Minimize2 className="-m-1 stroke-1" />
164164
</button>
165165
</Tooltip>
166166
</div>
Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
import * as React from "react"
22

3-
import { cn } from "@/lib/utils/cn"
4-
53
import { StarConfettiIcon } from "../../icons/quiz"
64

7-
export const QuizConfetti = () => {
8-
const commonClasses = "absolute"
9-
return (
10-
<div className="relative">
11-
<StarConfettiIcon className={cn(commonClasses, "start-0")} />
12-
13-
<StarConfettiIcon className={cn(commonClasses, "end-0 -scale-x-100")} />
14-
</div>
15-
)
16-
}
5+
export const QuizConfetti = () => (
6+
<div className="relative h-full w-full">
7+
{/* Use left/right (not start/end) to keep SVG orientation correct for placement */}
8+
<StarConfettiIcon className="absolute left-0 max-w-44" />
9+
<StarConfettiIcon className="absolute right-0 max-w-44 -scale-x-100" />
10+
</div>
11+
)

src/components/Simulator/screens/ConnectWeb3/Slider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const Slider = ({ isConnected, displayUrl, children }: SliderProps) => {
3939
animate={{ scale: 1 }}
4040
transition={{ type: "spring", delay: 0.25 }}
4141
>
42-
<Check className="size-[1em] -rotate-[10deg] text-[4.5rem]" />
42+
<Check className="size-[4.5rem] -rotate-[10deg] stroke-1" />
4343
</motion.div>
4444
<motion.div
4545
key="text"

src/components/Simulator/screens/CreateAccount/GeneratingKeys.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const GeneratingKeys = ({
5555
<div className="grid h-full place-items-center bg-background-highlight">
5656
<Flex className="flex-col items-center gap-4">
5757
{/* eslint-disable-next-line no-constant-condition */}
58-
{false && loading ? (
58+
{loading ? (
5959
<motion.div
6060
key="spinner"
6161
initial={{ opacity: 0 }}
@@ -72,7 +72,12 @@ export const GeneratingKeys = ({
7272
animate={{ scale: 1 }}
7373
transition={{ type: "spring", delay: 0.25 }}
7474
>
75-
<Check className={cn(SPINNER_SIZE, "size-[1em] -rotate-[10deg]")} />
75+
<Check
76+
className={cn(
77+
SPINNER_SIZE,
78+
"size-[1em] -rotate-[10deg] stroke-1"
79+
)}
80+
/>
7681
</motion.div>
7782
)}
7883
<p className="px-4 text-center md:px-8">

src/components/Simulator/screens/SendReceive/Success.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ export const Success = ({
103103
data-testid="success-icon"
104104
>
105105
<Check
106-
className={cn(ICON_SIZE, "size-[1em] -rotate-[10deg]")}
106+
className={cn(
107+
ICON_SIZE,
108+
"size-[1em] -rotate-[10deg] stroke-1"
109+
)}
107110
/>
108111
</motion.div>
109112
)}

src/components/Tooltip/Tooltip.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const meta = {
2222
content: <TooltipContent />,
2323
children: (
2424
<span data-testid="tooltip-icon">
25-
<Info />
25+
<Info className="size-4" />
2626
</span>
2727
),
2828
},
Lines changed: 25 additions & 2 deletions
Loading

src/components/ui/buttons/Button.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ const buttonVariants = cva(
4141
link: "border-transparent hover:shadow-none underline !min-h-0 !py-0 !px-1 active:text-primary",
4242
},
4343
size: {
44-
lg: "text-lg py-3 px-8 [&>svg]:text-2xl rounded-lg focus-visible:rounded-lg",
45-
md: "min-h-10.5 px-4 py-2 [&>svg]:text-2xl",
46-
sm: "text-xs min-h-[31px] py-1.5 px-2 [&>svg]:text-md",
44+
lg: "text-lg py-3 px-8 [&>svg]:size-6 rounded-lg focus-visible:rounded-lg",
45+
md: "min-h-10.5 px-4 py-2 [&>svg]:size-6",
46+
sm: "text-xs min-h-[31px] py-1.5 px-2 [&>svg]:size-4",
4747
},
4848
},
4949
defaultVariants: {

src/components/ui/carousel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ const CarouselPrevious = React.forwardRef<
217217
onClick={scrollPrev}
218218
{...props}
219219
>
220-
<ChevronLeft className="h-8 w-8" />
220+
<ChevronLeft className="size-6" />
221221
<span className="sr-only">Previous slide</span>
222222
</Button>
223223
)
@@ -246,7 +246,7 @@ const CarouselNext = React.forwardRef<
246246
onClick={scrollNext}
247247
{...props}
248248
>
249-
<ChevronRight className="h-8 w-8" />
249+
<ChevronRight className="size-6" />
250250
<span className="sr-only">Next slide</span>
251251
</Button>
252252
)

src/components/ui/radio-group.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const RadioGroupItem = React.forwardRef<
3535
{...props}
3636
>
3737
<RadioGroupPrimitive.Indicator className="flex items-center justify-center">
38-
<Circle className="size-2 text-[0.5rem]" />
38+
<Circle className="size-2 fill-current" />
3939
</RadioGroupPrimitive.Indicator>
4040
</RadioGroupPrimitive.Item>
4141
)

0 commit comments

Comments
 (0)