Skip to main content

Function: registerCustomCreateProject()

function registerCustomCreateProject(customCreateProject: CustomCreateProject): void;

Defined in: plugin/registry.tsx:1180

Register a new way to create Headlamp 'Projects'

Parameters​

ParameterTypeDescription
customCreateProjectCustomCreateProjectDefinition 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>
),
});