chore: add inline documentation for toggling history and bookmark features in module layouts
This commit is contained in:
@@ -25,6 +25,7 @@ registerModuleNamespace('history', { en: historyEn, id: historyId });
|
|||||||
registerModuleNamespace('bookmark', { en: bookmarkEn, id: bookmarkId });
|
registerModuleNamespace('bookmark', { en: bookmarkEn, id: bookmarkId });
|
||||||
|
|
||||||
export default function ModuleLayout({ children }: { children: React.ReactNode }) {
|
export default function ModuleLayout({ children }: { children: React.ReactNode }) {
|
||||||
|
// FIXME: To disable the history tracker, simply comment out or remove the following line:
|
||||||
useHistoryTracker();
|
useHistoryTracker();
|
||||||
|
|
||||||
const configAppShell: CoreAppShellConfig = {
|
const configAppShell: CoreAppShellConfig = {
|
||||||
@@ -47,12 +48,30 @@ export default function ModuleLayout({ children }: { children: React.ReactNode }
|
|||||||
config={configAppShell}
|
config={configAppShell}
|
||||||
slots={{
|
slots={{
|
||||||
header: <HeaderLayout />,
|
header: <HeaderLayout />,
|
||||||
sidebar: <SidebarMenu items={MENU_ITEMS} withToggle />,
|
sidebar: (
|
||||||
sidebarMobile: <SidebarMenu items={MENU_ITEMS} variantOverride="expanded" />,
|
<SidebarMenu
|
||||||
|
items={MENU_ITEMS}
|
||||||
|
withToggle
|
||||||
|
// FIXME: To hide the history and bookmark buttons from the sidebar, set these to false:
|
||||||
|
// showHistory={false}
|
||||||
|
// showBookmark={false}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
sidebarMobile: (
|
||||||
|
<SidebarMenu
|
||||||
|
items={MENU_ITEMS}
|
||||||
|
variantOverride="expanded"
|
||||||
|
// FIXME: To hide the history and bookmark buttons from the sidebar, set these to false:
|
||||||
|
// showHistory={false}
|
||||||
|
// showBookmark={false}
|
||||||
|
/>
|
||||||
|
),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
{/* FIXME: To hide the history drawer, comment out or remove the HistoryDrawer component below */}
|
||||||
<HistoryDrawer />
|
<HistoryDrawer />
|
||||||
|
{/* FIXME: To hide the bookmark drawer, comment out or remove the BookmarkDrawer component below */}
|
||||||
<BookmarkDrawer />
|
<BookmarkDrawer />
|
||||||
</CoreAppShell>
|
</CoreAppShell>
|
||||||
</EnterpriseStorageProvider>
|
</EnterpriseStorageProvider>
|
||||||
|
|||||||
Reference in New Issue
Block a user