portainer/app/react/kubernetes/components/CreateFromManifestButton.tsx

25 lines
540 B
TypeScript

import { useCurrentStateAndParams } from '@uirouter/react';
import { AutomationTestingProps } from '@/types';
import { AddButton } from '@@/buttons';
export function CreateFromManifestButton({
params = {},
'data-cy': dataCy,
}: { params?: object } & AutomationTestingProps) {
const { state } = useCurrentStateAndParams();
return (
<AddButton
to="kubernetes.deploy"
params={{
referrer: state.name,
...params,
}}
data-cy={dataCy}
>
Create from manifest
</AddButton>
);
}