mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
refactor(settings): migrate helm cert panel to react [EE-5505] (#9132)
This commit is contained in:
parent
c452de82b7
commit
f293ea41d3
19 changed files with 268 additions and 70 deletions
34
app/react/components/form-components/FormActions.tsx
Normal file
34
app/react/components/form-components/FormActions.tsx
Normal file
|
@ -0,0 +1,34 @@
|
|||
import { PropsWithChildren } from 'react';
|
||||
|
||||
import { LoadingButton } from '@@/buttons';
|
||||
|
||||
interface Props {
|
||||
submitLabel: string;
|
||||
loadingText: string;
|
||||
isLoading: boolean;
|
||||
isValid: boolean;
|
||||
}
|
||||
|
||||
export function FormActions({
|
||||
submitLabel = 'Save',
|
||||
loadingText = 'Saving',
|
||||
isLoading,
|
||||
children,
|
||||
isValid,
|
||||
}: PropsWithChildren<Props>) {
|
||||
return (
|
||||
<div className="form-group">
|
||||
<div className="col-sm-12">
|
||||
<LoadingButton
|
||||
loadingText={loadingText}
|
||||
isLoading={isLoading}
|
||||
disabled={!isValid}
|
||||
>
|
||||
{submitLabel}
|
||||
</LoadingButton>
|
||||
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue