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 submenus in Sidebar component #44

Open
aManNamedJed opened this issue May 10, 2021 · 0 comments
Open

Better submenus in Sidebar component #44

aManNamedJed opened this issue May 10, 2021 · 0 comments
Labels
feature request New feature or request help wanted Extra attention is needed

Comments

@aManNamedJed
Copy link
Contributor

The submenu items need to look like they're a separate submenu with better spacing to indicate they are nested under the parent

Screen Shot 2021-05-10 at 5 12 31 PM

This markup needs to be improved too:

Screen Shot 2021-05-10 at 5 17 07 PM

Instead of all existing in a single list, submenus should become a separate ul:

# Psuedocode

<ul class="nav-top">
    <li class="nav-item-top">Introduction</li>
    <li class="nav-item-top">Installation</li>
    <li class="nav-item-top">Monorepo</li>
    <li class="nav-item-top has-submenu">
        Blocks
        <ul class="nav-sub">
            <li class="nav-item-sub">Create a block</li>
            <li class="nav-item-sub">Block Structure</li>
        </ul>
    </li>
</ul>

Where is this code?
blocks/src/components/Elements/Sidebar/Sidebar.tsx

What's the easiest way to fix?
Edit the story blocks/src/components/Elements/Sidebar/Sidebar.stories.tsx and pass in some values that need to be storted and should include submenus like this:

export const Default = Template.bind({})
Default.args = {
  menuItems: [
    {
      title: "Using the monorepo",
      path: "docs/v0.1.0/monorepo",
      order: "1.0"
    },
    {
      title: "Using the monorepo",
      path: "docs/v0.1.0/monorepo",
      order: "1.1"
    },
    {
      title: "Using the monorepo",
      path: "docs/v0.1.0/monorepo",
      order: "2.0"
    },
    {
      title: "Using the monorepo",
      path: "docs/v0.1.0/monorepo",
      order: "3.0"
    },
  ],
}
@aManNamedJed aManNamedJed added feature request New feature or request help wanted Extra attention is needed labels May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant