Skip to content

sidebar badge on parent menus #42

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

Merged
merged 1 commit into from
Oct 8, 2018
Merged

sidebar badge on parent menus #42

merged 1 commit into from
Oct 8, 2018

Conversation

jeff-nz
Copy link

@jeff-nz jeff-nz commented Oct 8, 2018

Objective:
Badges on sidebar menus with children.

To test badge on sidebar's parent menu:
Temporarily change data in ./demo/src/_nav.js to:

export default {
  items: [
    {
      name: 'Dashboard',
      url: '/dashboard',
      icon: 'cui-speedometer icons',
      badge: {
        variant: 'info',
        text: 'NEW'
      }
    },
    {
      name: 'Category',
      url: '/category',
      icon: 'cui-speedometer icons',
      badge: {
        variant: 'danger',
        text: '2'
      },
      children: [
        {
          name: 'Sub Category 1',
          url: '/sub-category-1',
          icon: 'cui-speedometer icons'
        },
        {
          name: 'Sub Category 2',
          url: '/sub-category-2',
          icon: 'cui-speedometer icons',
          badge: {
            variant: 'danger',
            text: '1'
          }
        },
        {
          name: 'Sub Category 3',
          url: '/sub-category-3',
          icon: 'cui-speedometer icons',
          badge: {
            variant: 'danger',
            text: '1'
          }
        }
      ]
    }
  ]
};

closes feature/sidebar-badge-on-parent-menus

closes feature/sidebar-badge-on-parent-menus
@jeff-nz jeff-nz changed the base branch from dev-vnext to master October 8, 2018 06:30
@jeff-nz jeff-nz changed the title Feature/sidebar badge on parent menus sidebar badge on parent menus Oct 8, 2018
@xidedix
Copy link
Member

xidedix commented Oct 8, 2018

hi @jeff-nz your PR looks valid, thanks!
we need to update @coreui/coreui scss aswell, in order to make it work with production build, not only demo css

@xidedix xidedix merged commit 63dd5ff into coreui:master Oct 8, 2018
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.

2 participants