From 809bd6b68026c25cc8d3ecf8d30e0610044c4e54 Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Mon, 22 Aug 2022 11:24:53 +0100 Subject: [PATCH] feat: add support for additional text below the sidebar logo --- src/adminjs-options.interface.ts | 5 ++++- src/frontend/components/app/sidebar/sidebar-branding.tsx | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/adminjs-options.interface.ts b/src/adminjs-options.interface.ts index 33ee9fe86..b967b78ae 100644 --- a/src/adminjs-options.interface.ts +++ b/src/adminjs-options.interface.ts @@ -349,7 +349,10 @@ export type BrandingOptions = { * @new since 6.0.0 */ withMadeWithLove?: boolean; - + /** + * Optional additional text below the logo/companyName. + */ + additionalText?: string; /** * URL to a favicon */ diff --git a/src/frontend/components/app/sidebar/sidebar-branding.tsx b/src/frontend/components/app/sidebar/sidebar-branding.tsx index b447117cb..774653987 100644 --- a/src/frontend/components/app/sidebar/sidebar-branding.tsx +++ b/src/frontend/components/app/sidebar/sidebar-branding.tsx @@ -43,7 +43,7 @@ const h = new ViewHelpers() const SidebarBranding: React.FC = (props) => { const { branding } = props const { logo, companyName } = branding - return ( + return <> = (props) => { /> ) :

{companyName}

}
- ) + { branding.additionalText && + {branding.additionalText} + } + ; } export default allowOverride(SidebarBranding, 'SidebarBranding')