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 custom icon override for menu button #29934

Open
3 tasks done
craigbehnke opened this issue Oct 11, 2024 · 0 comments
Open
3 tasks done

feat: add custom icon override for menu button #29934

craigbehnke opened this issue Oct 11, 2024 · 0 comments
Labels

Comments

@craigbehnke
Copy link

Prerequisites

Describe the Feature Request

Add a configuration option for the IonMenuButton component to allow developers to override the icon used.

Describe the Use Case

Creating an override option would allow developers to more easily create an application with more than one menu/sidebar, without either

  1. Having 2 buttons look identical
  2. Needing to create a menu button component of their own

Describe Preferred Solution

Create a config option for the menu button that overrides the default icons.

So this:

const menuIcon = config.get('menuIcon', mode === 'ios' ? menuOutline : menuSharp);

would become something like this:

let menuIcon = config.get('menuIcon', mode === 'ios' ? menuOutline : menuSharp);
if (customIcon) {
  menuIcon = customIcon;
}

link to existing code

Describe Alternatives

I could create a clone of the component that uses a custom icon, but this would cause the

Related Code

No response

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant