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

HxDropdownItem - add Icon parameter, default and documentation #655

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

Conversation

vaclavek
Copy link

@vaclavek vaclavek commented Nov 9, 2023

I noticed that the property 'Icon' is missing on HxDropdownItem. I added the property as it is implemented in HxContextMenuItem, including the CSS variable and documentation. Is there anything else I should do? :)

@vaclavek vaclavek requested a review from hakenr November 9, 2023 20:53
Copy link
Member

@hakenr hakenr left a comment

Choose a reason for hiding this comment

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

The HxDropdownItem is intended to be a "bare" Bootstrap component, and icons can be readily incorporated via the ChildContent. This is in contrast to HxContextMenuItem, which is a more comprehensive component that we define. Conversely, the HxButton does feature an Icon property. We could offer these enhancements to simplify the use of our component library.

However, I'm curious as to why you opted for HxDropdownItem to add the Icon property. Should this functionality also extend to HxDropdownItemNavLink and HxDropdownItemText? Perhaps even to HxDropdownHeader?

cc @crdo

@@ -79,6 +80,9 @@
--hx-context-menu-button-hover-background: var(--bs-secondary-bg);
--hx-context-menu-item-icon-margin: 0 .5rem 0 0;

/* HxDropdown */
--hx-dropdown-menu-item-icon: 0 .5rem 0 0;
Copy link
Member

Choose a reason for hiding this comment

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

This should be named --hx-dropdown-menu-item-icon-margin (see the HxContextMenuItem variable few lines above).

@hakenr hakenr self-assigned this Nov 9, 2023
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.

None yet

2 participants