Skip to content

Commit

Permalink
Checkbox: Add cursor:not-allowed to unchecked disabled state (#4176)
Browse files Browse the repository at this point in the history
* move disabled cursor out of checked

* Create unlucky-boats-film.md

* update snapshots
  • Loading branch information
siddharthkp committed Jan 30, 2024
1 parent e9a84c8 commit b8b090b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/unlucky-boats-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Checkbox: Add `not-allowed` cursor to unchecked disabled state
5 changes: 4 additions & 1 deletion src/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ const StyledCheckbox = styled.input`
}
}
&:disabled {
cursor: not-allowed;
}
&:checked {
transition:
background-color,
Expand All @@ -82,7 +86,6 @@ const StyledCheckbox = styled.input`
}
&:disabled {
cursor: not-allowed;
background-color: ${get('colors.fg.muted')};
border-color: ${get('colors.fg.muted')};
opacity: 1;
Expand Down

0 comments on commit b8b090b

Please sign in to comment.