Skip to content

Commit

Permalink
fix(clerk-js): Make country code to mach the rest of the phone input …
Browse files Browse the repository at this point in the history
…text color when it's disabled (#2810)
  • Loading branch information
octoper authored Feb 16, 2024
1 parent 45c9200 commit 1073770
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .changeset/quick-countries-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
9 changes: 8 additions & 1 deletion packages/clerk-js/src/ui/elements/PhoneInput/PhoneInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,14 @@ const PhoneInputBase = forwardRef<HTMLInputElement, PhoneInputProps & { feedback
}}
>
<Text
sx={{ position: 'absolute', left: '1ch', top: '50%', transform: 'translateY(-50%)', pointerEvents: 'none' }}
sx={t => ({
position: 'absolute',
left: '1ch',
top: '50%',
transform: 'translateY(-50%)',
pointerEvents: 'none',
opacity: props.isDisabled ? t.opacity.$disabled : 1,
})}
>
+{selectedCountryOption.country.code}
</Text>
Expand Down

0 comments on commit 1073770

Please sign in to comment.