File tree 3 files changed +21
-12
lines changed 3 files changed +21
-12
lines changed Original file line number Diff line number Diff line change @@ -14,18 +14,8 @@ import Button from 'components/Buttons/Button/Button';
14
14
import Form from 'components/Form/Form' ;
15
15
import Alert from 'components/Alert/Alert' ;
16
16
import ProgressIndicator from 'components/ProgressIndicator/ProgressIndicator' ;
17
- import { twMerge } from 'tailwind-merge' ;
18
17
import type { OptionType } from 'components/Form/Select/ThemedReactSelect' ;
19
-
20
- const InlineLoadingSpinner = ( { className } : { className ?: string } ) => (
21
- < span
22
- aria-hidden
23
- className = { twMerge (
24
- 'border-solid border-white border-4 !border-b-themePrimary rounded-[50%] h-5 w-5 box-border animate-spin group-hover:border-themeSecondary transition-colors' ,
25
- className ,
26
- ) }
27
- />
28
- ) ;
18
+ import { InlineLoadingSpinner } from 'components/InlineLoadingSpinner' ;
29
19
30
20
interface MultiStepFormProps < T > {
31
21
initialValues : T ;
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import Link from 'next/link';
13
13
import OutboundLink from 'components/OutboundLink/OutboundLink' ;
14
14
import type { AxiosError } from 'axios' ;
15
15
import axios from 'axios' ;
16
+ import { InlineLoadingSpinner } from 'components/InlineLoadingSpinner' ;
16
17
17
18
export interface RegistrationFormValues {
18
19
email : string ;
@@ -222,7 +223,10 @@ export function RegistrationForm({
222
223
223
224
< div className = "max-w-md px-3 mt-5" >
224
225
< Button type = "submit" theme = "secondary" disabled = { isSubmitting } >
225
- Submit
226
+ < span className = "flex items-center justify-center gap-x-2" >
227
+ { isSubmitting && < InlineLoadingSpinner /> }
228
+ < span className = "mt-[0.325rem]" > Submit ✓</ span >
229
+ </ span >
226
230
</ Button >
227
231
< p className = "pt-5 text-xs" >
228
232
The demographic information you provide, helps us understand our community needs,
Original file line number Diff line number Diff line change
1
+ import { twMerge } from 'tailwind-merge' ;
2
+
3
+ interface InlineLoadingSpinnerProps {
4
+ className ?: string ;
5
+ }
6
+
7
+ export const InlineLoadingSpinner = ( { className } : InlineLoadingSpinnerProps ) => (
8
+ < span
9
+ aria-hidden
10
+ className = { twMerge (
11
+ 'border-solid border-white border-4 !border-b-themePrimary rounded-[50%] h-5 w-5 box-border animate-spin group-hover:border-themeSecondary transition-colors' ,
12
+ className ,
13
+ ) }
14
+ />
15
+ ) ;
You can’t perform that action at this time.
0 commit comments