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

Extend type of title prop on TopNavigation and SidebarNavigation #287

Closed
fbeceic opened this issue Dec 13, 2024 · 0 comments
Closed

Extend type of title prop on TopNavigation and SidebarNavigation #287

fbeceic opened this issue Dec 13, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@fbeceic
Copy link
Collaborator

fbeceic commented Dec 13, 2024

Basic information

  • Tiller version: v1.15.1
  • Module: menu

Enhancement description

The title prop on TopNavigation and SidebarNavigation is of type string, which restricts the component usage if, for e.g., the Intl component needs to be passed as the title.

The prop should be of extended type, for e.g. React.ReactNode in order to increase flexibility and enable localization without leading to compiler errors because of type mismatch.

Current behaviour

title prop only accepts string type.

Wanted behaviour

title prop accepts React.ReactNode type.

Possible workarounds

Passing anything as title prop and suppressing the compiler errors with ts-ignore.

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