hooks/usePluginAppBar#
PluginAppBarProvider()#
Parameters#
| Parameter | Type |
|---|---|
props |
{ children: ReactNode; } |
props.children |
ReactNode |
Returns#
Element
usePluginAppBar()#
Hook for plugins to configure their AppBar content
Returns#
clearAppBar#
Returns#
void
setAppBar#
Parameters#
| Parameter | Type |
|---|---|
config |
PluginAppBarConfig |
Returns#
void
Example#
const SaveLoadButtons = useSaveLoadButtons({ ... })
const { setAppBar } = usePluginAppBar()
useEffect(() => {
setAppBar({
form: <SaveLoadButtons />,
shortcut: <EditViewSwitch />
})
}, [])
PluginAppBarConfig#
Properties#
form?#
Custom form content (center area)
shortcut?#
Custom shortcut content (right area)