From c7e4eb1b3fc5dcf62919a8f2fa2fbe277edd4ad7 Mon Sep 17 00:00:00 2001 From: Beebles <102569435+beebls@users.noreply.github.com> Date: Thu, 27 Jul 2023 07:58:21 -0600 Subject: Add Custom `TitleView` (#512) * feat(titleView): Add Custom TitleView support * fix: wrap TitleView in Focusable * fix: remove root div on TitleView --- frontend/src/components/TitleView.tsx | 6 +++--- frontend/src/plugin.ts | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'frontend') diff --git a/frontend/src/components/TitleView.tsx b/frontend/src/components/TitleView.tsx index 6ae6b2ae..111f8c80 100644 --- a/frontend/src/components/TitleView.tsx +++ b/frontend/src/components/TitleView.tsx @@ -49,15 +49,15 @@ const TitleView: VFC = () => { } return ( -
+ -
{activePlugin.name}
-
+ {activePlugin?.titleView ||
{activePlugin.name}
} + ); }; diff --git a/frontend/src/plugin.ts b/frontend/src/plugin.ts index c8467580..fa1bb28a 100644 --- a/frontend/src/plugin.ts +++ b/frontend/src/plugin.ts @@ -5,6 +5,7 @@ export interface Plugin { content?: JSX.Element; onDismount?(): void; alwaysRender?: boolean; + titleView?: JSX.Element; } export enum InstallType { -- cgit v1.2.3