Last active
February 24, 2023 18:04
-
-
Save josephfusco/b781839e8c33dc729b64f94eaa8a57c3 to your computer and use it in GitHub Desktop.
Revisions
-
josephfusco revised this gist
Feb 24, 2023 . No changes.There are no files selected for viewing
-
josephfusco revised this gist
Feb 24, 2023 . No changes.There are no files selected for viewing
-
josephfusco created this gist
Feb 24, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ import React from 'react'; import { FaustHooks, FaustPlugin } from '@faustwp/core'; import { FaustToolbarNodes, ToolbarNodeSkeleton } from '@faustwp/core/toolbar'; export class CustomToolbar implements FaustPlugin { apply(hooks: FaustHooks) { hooks.addFilter('toolbarNodes', 'faust', (toolbarNodes: FaustToolbarNodes) => { const customToolbarNodes: FaustToolbarNodes = [ { id: 'test1', location: 'primary', component: <ToolbarNodeSkeleton />, }, { id: 'test2', location: 'primary', component: <ToolbarNodeSkeleton />, }, ]; return [...toolbarNodes, ...customToolbarNodes]; }); } }