mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
feat(ui/buttons): introduce Add and Delete buttons [EE-6296] (#10585)
This commit is contained in:
parent
66635ba6b1
commit
1f2f4525e3
6 changed files with 108 additions and 47 deletions
24
app/react/kubernetes/components/CreateFromManifestButton.tsx
Normal file
24
app/react/kubernetes/components/CreateFromManifestButton.tsx
Normal file
|
@ -0,0 +1,24 @@
|
|||
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>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue