Skip to content

Commit d036bb5

Browse files
committed
fix: ghost button hover bg color
1 parent dbc7c01 commit d036bb5

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

.changeset/busy-turkeys-follow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@msw-dev-tool/react": patch
3+
---
4+
5+
Fixed a bug where nothing happens when hovering a button

packages/react/src/style/msw-dev-tool.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
@source inline("bg-{white,gray-{100,200},orange-{500,600},teal-{500,600},red-{500,600}}");
1111

1212
/* ===== Hover Background Colors ===== */
13-
@source inline("{hover:}bg-{gray-{50,100},orange-500,teal-500,red-500}");
13+
@source inline("{hover:}bg-{gray-{50,100},orange-500,teal-500,red-500} hover:bg-opacity-10");
1414

1515
/* ===== Borders ===== */
1616
@source inline("border border-none border-gray-300");

packages/react/src/ui/Components/Button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ const getVariantClasses = (
7474
color.bg.replace("bg-", "border-"),
7575
color.bg.replace("bg-", "text-"),
7676
],
77-
hover: ["hover:bg-opacity-10", color.bg],
77+
hover: ["hover:bg-gray-50", color.bg],
7878
}),
7979
ghost: (color) => ({
8080
base: ["bg-transparent", color.bg.replace("bg-", "text-"), "border-none"],
81-
hover: ["hover:bg-opacity-10", color.bg],
81+
hover: ["hover:bg-gray-50", color.bg],
8282
}),
8383
link: (color) => ({
8484
base: [

packages/react/src/ui/DevToolContent/ToolButtonGroup/HandlerForm.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export const HandlerForm = ({ onClose }: HandlerFormProps) => {
7979
error={errors.delay?.message}
8080
placeholder="delay time (ms)"
8181
type="number"
82+
min={0}
8283
onWheel={(e) => e.currentTarget.blur()}
8384
/>
8485
<SelectFormField

0 commit comments

Comments
 (0)