File tree Expand file tree Collapse file tree 2 files changed +36
-9
lines changed
lib/ts/recipe/webauthn/components/themes/signUp Expand file tree Collapse file tree 2 files changed +36
-9
lines changed Original file line number Diff line number Diff line change 1+ /* Copyright (c) 2024, VRAI Labs and/or its affiliates. All rights reserved.
2+ *
3+ * This software is licensed under the Apache License, Version 2.0 (the
4+ * "License") as published by the Apache Software Foundation.
5+ *
6+ * You may not use this file except in compliance with the License. You may
7+ * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
8+ *
9+ * Unless required by applicable law or agreed to in writing, software
10+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12+ * License for the specific language governing permissions and limitations
13+ * under the License.
14+ */
15+
16+ import { withOverride } from "../../../../../components/componentOverride/withOverride" ;
17+ import { useTranslation } from "../../../../../translation/translationContext" ;
18+
19+ export const ContinueWithoutPasskey = withOverride (
20+ "continueWithoutPasskey" ,
21+ function ContinueWithoutPasskeyButton ( props : { onClick : ( ) => void } ) : JSX . Element {
22+ const t = useTranslation ( ) ;
23+
24+ return (
25+ < div data-supertokens = "continueWithoutPasskey" >
26+ < a onClick = { props . onClick } data-supertokens = "formLabelLinkBtn continueWithoutPasskeyLabel" >
27+ { t ( "WEBAUTHN_CONTINUE_WITHOUT_PASSKEY_BUTTON" ) }
28+ </ a >
29+ </ div >
30+ ) ;
31+ }
32+ ) ;
Original file line number Diff line number Diff line change @@ -21,24 +21,19 @@ import { Label } from "../../../../emailpassword/components/library";
2121import FormBase from "../../../../emailpassword/components/library/formBase" ;
2222import { defaultEmailValidator } from "../../../../emailpassword/validators" ;
2323
24+ import { ContinueWithoutPasskey } from "./continueWithoutPasskey" ;
25+
2426import type { SignUpFormProps } from "../../../types" ;
2527
2628export const SignUpForm = withOverride (
2729 "PasskeySignUpForm" ,
28- function PasswordlessEmailForm (
30+ function PasskeyEmailForm (
2931 props : SignUpFormProps & {
3032 footer ?: JSX . Element ;
3133 }
3234 ) : JSX . Element {
3335 const t = useTranslation ( ) ;
34-
35- const defaultFooter = (
36- < div data-supertokens = "continueWithoutPasskey" >
37- < a onClick = { props . resetFactorList } data-supertokens = "formLabelLinkBtn continueWithoutPasskeyLabel" >
38- { t ( "WEBAUTHN_CONTINUE_WITHOUT_PASSKEY_BUTTON" ) }
39- </ a >
40- </ div >
41- ) ;
36+ const defaultFooter = < ContinueWithoutPasskey onClick = { props . resetFactorList } /> ;
4237
4338 return (
4439 < FormBase
You can’t perform that action at this time.
0 commit comments