Function: registerAppBarAction()
function registerAppBarAction(headerAction: AppBarAction | AppBarActionsProcessor | AppBarActionProcessorType | AppBarActionType): void
Add a component into the app bar (at the top of the app).
Parameters
Parameter | Type | Description |
---|---|---|
headerAction | AppBarAction | AppBarActionsProcessor | AppBarActionProcessorType | AppBarActionType | The 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);