Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for additional text below the sidebar logo #1220

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Half-Shot
Copy link

This allows us to specify which environment our application is on. It felt like a good idea to make this generic and upstream the work rather than making a custom component.

@@ -55,7 +55,10 @@ const SidebarBranding: React.FC<Props> = (props) => {
/>
) : <h1>{companyName}</h1>}
</StyledLogo>
)
{ branding.additionalText &&
<span>{branding.additionalText}</span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use Text (import { Text } from '@adminjs/design-system). This uses AdminJS global styles.

/**
* Optional additional text below the logo/companyName.
*/
additionalText?: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just adding NODE_ENV here:
https://github.com/SoftwareBrothers/adminjs/blob/master/src/frontend/components/app/version.tsx
if it's just to display the environment information?

We can also add additional option to branding but I'd use a different name like logoTitle, logoSubtitle, headerText, headerMessage, menuHeaderMessage, menuHeaderText which would indicate where it'll appear just by looking at it's name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants