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

Better documentation on simple Menu List #198

Closed
zemian opened this issue Aug 23, 2023 · 2 comments
Closed

Better documentation on simple Menu List #198

zemian opened this issue Aug 23, 2023 · 2 comments

Comments

@zemian
Copy link

zemian commented Aug 23, 2023

The doc on https://cirrus-ui.netlify.app/elements/lists#menus has a demo with simple menu list, but no code example is given. When I try this, it's surprised me that what's described is not enough to get the selected row to be highlighted.

What I mean is the following will not have selected item displayed:

<ul class="menu">
   <li class="menu-item">Google Chrome</li>
   <li class="menu-item selected">Firefox</li>
   <li class="menu-item">Polarity</li>
</ul>

User must use <a> to see the selected usage. I suggest either documentation should mention this, or better yet, make <a> not a requirement, so user can use <span> or <div> in case where the menu item does not go to another page url, but simply handle user click event.

@Spiderpig86
Copy link
Owner

I will be updating this component so that the a tag is no longer required. The following is what we should expect where the top is for a regular list for any element and the bottom has the anchor tag embedded inside the list item.

image

Spiderpig86 added a commit that referenced this issue Oct 22, 2023
…o support nested lists, expand list stylings to child divs and spans first children only #198
Spiderpig86 added a commit that referenced this issue Oct 22, 2023
…plying list stylings to child link to support nested lists, expand list stylings to child divs and spans first children only #198
@Spiderpig86
Copy link
Owner

This has been updated to go back to the old model where the menu-item doesn't contain the main styling, but the child elements do (e.g. a and now span and div). This is so we can continue supporting nested lists.
image

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

No branches or pull requests

2 participants