Skip to content

Commit 8afe342

Browse files
authored
fix(clerk-js): Pass valid DOM property to input (#6458)
1 parent 0b165f8 commit 8afe342

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/shaky-baboons-taste.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/clerk-js': patch
3+
---
4+
5+
Fix invalid DOM element prop being passed down to Input

packages/clerk-js/src/ui/primitives/Input.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>((props, ref)
8686

8787
const typeProps =
8888
type === 'email'
89-
? { type: 'text', pattern: '^.*@[a-zA-Z0-9\\-]+\\.[a-zA-Z0-9\\-\\.]+$', inputmode: 'email' }
90-
: { type: type || 'text' };
89+
? { type: 'text' as const, pattern: '^.*@[a-zA-Z0-9\\-]+\\.[a-zA-Z0-9\\-\\.]+$', inputMode: 'email' as const }
90+
: { type: type || ('text' as const) };
9191

9292
const passwordManagerProps = ignorePasswordManager
9393
? {

0 commit comments

Comments
 (0)