Skip to content

Commit

Permalink
fix(clerk-js): Update input group styles match the designs (#2996)
Browse files Browse the repository at this point in the history
* fix(clerk-js): Update input group styles match the designs

* chore(repo): Add Changeset
  • Loading branch information
octoper authored Mar 14, 2024
1 parent 94bbdf7 commit 1c199d1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/grumpy-jobs-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Fix for input group components with prefix or suffix to match the rest of the design
13 changes: 6 additions & 7 deletions packages/clerk-js/src/ui/elements/InputGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ export const InputGroup = forwardRef<
position: 'relative',
zIndex: 1,
...common.borderVariants(theme).normal,
':focus-within': {
...common.borderVariants(theme, {
focusRignt: true,
}).normal['&:focus'],
},
})}
>
{groupPrefix && (
Expand All @@ -56,17 +61,11 @@ export const InputGroup = forwardRef<
maxLength={25}
sx={[
{
boxShadow: 'none',
borderWidth: 0,
':hover:not(:focus)': {
borderWidth: 0,
boxShadow: 'none',
},
height: '100%',
...inputBorder,
},
sx,
]}
variant='unstyled'
ref={ref}
{...rest}
/>
Expand Down
3 changes: 3 additions & 0 deletions packages/clerk-js/src/ui/polishedAppearance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ export const polishedAppearance: Appearance = {
phoneInputBox: {
...inputStyles(theme),
},
formInputGroup: {
...inputStyles(theme),
},
selectSearchInput__countryCode: {
boxShadow: 'none',
'&:focus': { boxShadow: 'none' },
Expand Down

0 comments on commit 1c199d1

Please sign in to comment.