Просмотр исходного кода

update the submit button margin

Abhinav 3 лет назад
Родитель
Сommit
3dc1b60e90
3 измененных файлов с 5 добавлено и 2 удалено
  1. 1 0
      src/components/Login.tsx
  2. 3 1
      src/components/SubmitButton.tsx
  3. 1 1
      src/pages/verify/index.tsx

+ 1 - 0
src/components/Login.tsx

@@ -80,6 +80,7 @@ export default function Login(props: LoginProps) {
                         />
 
                         <SubmitButton
+                            sx={{ mb: 4 }}
                             buttonText={constants.LOGIN}
                             loading={waiting}
                         />

+ 3 - 1
src/components/SubmitButton.tsx

@@ -12,8 +12,9 @@ const SubmitButton: FC<ButtonProps<'button', Props>> = ({
     buttonText,
     inline,
     disabled,
+    sx,
     ...props
-}: Props) => {
+}) => {
     return (
         <Button
             size="large"
@@ -22,6 +23,7 @@ const SubmitButton: FC<ButtonProps<'button', Props>> = ({
             type="submit"
             fullWidth={!inline}
             disabled={loading || disabled}
+            sx={{ my: 2, ...sx }}
             {...props}>
             {loading ? <CircularProgress size={25} /> : buttonText}
         </Button>

+ 1 - 1
src/pages/verify/index.tsx

@@ -163,7 +163,7 @@ export default function Verify() {
                             />
 
                             <SubmitButton
-                                sx={{ mt: 2, mb: 4 }}
+                                sx={{ mb: 4 }}
                                 buttonText={constants.VERIFY}
                                 loading={loading}
                             />