-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create Direct Test By Criteria B1 Tab functionality: Site 3912 (#105)
* Changes from SITE-3986 * Update B1Tab.tsx * Create SMTPTestCases.tsx * Remove duplicate files * Add env variables and move API calls to ServerActions * Improve environment variable name * Remove env variables * Add Loading Button, Remove Default Profile Values
- Loading branch information
1 parent
fa602aa
commit 1b4bb61
Showing
4 changed files
with
64 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React, { ReactNode } from 'react' | ||
import { Button, CircularProgress } from '@mui/material' | ||
import CheckIcon from '@mui/icons-material/Check' | ||
import { ButtonProps } from '@mui/material/Button' | ||
|
||
interface LoadingButtonProps extends ButtonProps { | ||
loading: boolean | ||
done: boolean | ||
children: ReactNode | ||
} | ||
|
||
const LoadingButton: React.FC<LoadingButtonProps> = ({ loading, done, children, ...props }) => { | ||
return ( | ||
<Button {...props} disabled={loading || done}> | ||
{done ? <CheckIcon /> : loading ? <CircularProgress size={24} /> : children} | ||
</Button> | ||
) | ||
} | ||
|
||
export default LoadingButton |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters