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

[FEATURE] - Change options.title type from string to React.ReactNode #512

Open
vincentwinkel opened this issue Jan 8, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@vincentwinkel
Copy link

Summary

It could be nice to add the logo of our company/website next to the title.

Instead of making a complex configuration with options.title, options.logo, etc, I guess it's better to allow a ReactNode (bonus: backward compatibility with string) and let us customize as we want (adding padding, etc).

Basic Example

Use case: display a logo + title of the company.

Currently:

const options: NextAdminOptions = {
  title: BRAND,
};

What could be nice:

const options: NextAdminOptions = {
  title: (
    <div className="flex items-center space-x-2">
      <Logo />
      <span>${BRAND}</span>
    </div>
  ),
};

Drawbacks

Such a feature (if we choose to use a ReactNode) forces the configuration to be declared in a .jsx|.tsx file.

Unresolved questions

No response

@vincentwinkel vincentwinkel added the enhancement New feature or request label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant