You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/react/components/form-components/FormActions.tsx

36 lines
682 B

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
className="!ml-0"
loadingText={loadingText}
isLoading={isLoading}
disabled={!isValid}
>
{submitLabel}
</LoadingButton>
{children}
</div>
</div>
);
}