Function: registerCustomCreateProject()
function registerCustomCreateProject(customCreateProject: CustomCreateProject): void;
Defined in: plugin/registry.tsx:1180
Register a new way to create Headlamp 'Projects'
Parameters
| Parameter | Type | Description |
|---|---|---|
customCreateProject | CustomCreateProject | Definition for custom creator |
Returns
void
Example
import {
DefaultCreateProject,
registerCustomCreateProject,
} from '@kinvolk/headlamp-plugin/lib';
registerCustomCreateProject({
id: DefaultCreateProject.NEW_PROJECT,
name: 'Create Managed Project',
description: 'Create a project managed by the platform',
icon: 'mdi:folder-plus',
component: ({ onBack }) => (
<div>
Create project
<button onClick={onBack}>Back</button>
</div>
),
});