Skip to main content

Function: registerAppBarAction()

function registerAppBarAction(headerAction: AppBarAction | AppBarActionsProcessor | AppBarActionProcessorType | AppBarActionType): void

Add a component into the app bar (at the top of the app).

Parameters

ParameterTypeDescription
headerActionAppBarAction | AppBarActionsProcessor | AppBarActionProcessorType | AppBarActionTypeThe action (link) to put in the app bar.

Returns

void

Example

import { registerAppBarAction } from '@kinvolk/headlamp-plugin/lib';
import { Button } from '@mui/material';

function ConsoleLogger() {
return (
<Button
onClick={() => {
console.log('Hello from ConsoleLogger!')
}}
>
Print Log
</Button>
);
}

registerAppBarAction(ConsoleLogger);

Defined in

src/plugin/registry.tsx:450