-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Checkbox): center checkbox icon (#1821)
Co-authored-by: Chitangchin <[email protected]>
- Loading branch information
1 parent
3d7125f
commit 0693ce9
Showing
2 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
'@strapi/design-system': patch | ||
--- | ||
|
||
fix: Checkbox Item Not Centered | ||
|
||
Added justify-content: center and align-items: center to Checkbox Indicator component | ||
|
||
Original: | ||
|
||
const CheckboxIndicator = styled(Checkbox.Indicator)` width: 100%; | ||
height: 100%; | ||
cursor: pointer;`; | ||
|
||
Updated: | ||
|
||
const CheckboxIndicator = styled(Checkbox.Indicator)` | ||
|
||
- display: inline-flex; | ||
- pointer-events: auto !important; | ||
width: 100%; | ||
height: 100%; | ||
cursor: pointer; | ||
- justify-content: center; | ||
- align-items: center; | ||
`; | ||
|
||
Refactored inline styling and added it to checkbox indicator stype component | ||
|
||
Original: | ||
|
||
<CheckboxIndicator style={{ display: 'inline-flex', pointerEvents: 'auto'}} forceMount> | ||
|
||
Updated: | ||
|
||
<CheckboxIndicator forceMount> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters