Skip to content

Commit 1a2eee6

Browse files
chore(types,clerk-js): Add otp success text descriptor (#6958)
1 parent 3b11bca commit 1a2eee6

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

.changeset/new-banks-doubt.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@clerk/clerk-js': patch
3+
'@clerk/types': patch
4+
---
5+
6+
Add success text descriptor to otp input field.

packages/clerk-js/src/ui/customizables/elementDescriptors.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export const APPEARANCE_KEYS = containsAllElementsConfigKeys([
102102
'otpCodeFieldInput',
103103
'otpCodeFieldInputContainer',
104104
'otpCodeFieldErrorText',
105+
'otpCodeFieldSuccessText',
105106
'formResendCodeLink',
106107

107108
'dividerRow',

packages/clerk-js/src/ui/elements/Form.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ const OTPInput = (props: OTPInputProps) => {
295295
center
296296
elementDescriptors={{
297297
error: descriptors.otpCodeFieldErrorText,
298+
success: descriptors.otpCodeFieldSuccessText,
298299
}}
299300
/>
300301
</Flex>

packages/types/src/appearance.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ export type ElementsConfig = {
230230
otpCodeFieldInput: WithOptions;
231231
otpCodeFieldInputContainer: WithOptions;
232232
otpCodeFieldErrorText: WithOptions;
233+
otpCodeFieldSuccessText: WithOptions;
233234

234235
dividerRow: WithOptions;
235236
dividerColumn: WithOptions;

0 commit comments

Comments
 (0)