Skip to content

Commit

Permalink
fix(clerk-js): Improve checkbox label alignment (#4426)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcarpenter authored Oct 29, 2024
1 parent 01258ed commit a06f1f3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/giant-roses-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/clerk-js": patch
---

Improve checkbox label alignment to account for wrapping labels.
1 change: 1 addition & 0 deletions packages/clerk-js/src/ui/elements/FieldControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ const CheckboxIndicator = forwardRef<HTMLInputElement>((_, ref) => {
focusRing={false}
sx={t => ({
width: 'fit-content',
flexShrink: 0,
marginTop: t.space.$0x5,
})}
/>
Expand Down
5 changes: 1 addition & 4 deletions packages/clerk-js/src/ui/elements/LegalConsentCheckbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,7 @@ export const LegalCheckbox = (

return (
<Field.Root {...props}>
<Flex
align='center'
justify='center'
>
<Flex justify='center'>
<Field.CheckboxIndicator />
<FormLabel
elementDescriptor={descriptors.formFieldRadioLabel}
Expand Down

0 comments on commit a06f1f3

Please sign in to comment.