Skip to content

Commit

Permalink
Fix differences between vertical nav HTML and React versions (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
line47 authored Feb 20, 2019
1 parent 57b2bea commit cb2c449
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
32 changes: 25 additions & 7 deletions packages/core/src/components/VerticalNav/VerticalNav.example.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,44 @@ ReactDOM.render(
selectedId="team"
items={[
{
label: 'Home',
label: 'Parent link',
url: 'javascript:void(0);'
},
{
label: 'About',
label: 'Current page',
selected: true,
items: [
{
id: 'team',
label: 'Team',
id: 'childlink1',
label: 'Child link',
url: 'javascript:void(0);'
},
{
id: 'company',
label: 'Company',
label: 'Child link',
selected: true,
items: [
{
id: 'grandchildlink1',
label: 'Grandchild link',
url: 'javascript:void(0);'
},
{
id: 'grandchildlink2',
label: 'Grandchild link',
url: 'javascript:void(0);',
selected: true
}
]
},
{
id: 'childlink3',
label: 'Child link',
url: 'javascript:void(0);'
}
]
},
{
label: 'Contact',
label: 'Parent link',
url: 'javascript:void(0);'
}
]}
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/components/VerticalNav/VerticalNav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ Markup:
<a class="ds-c-vertical-nav__label" href="javascript:void(0);">Parent link</a>
</li>
<li class="ds-c-vertical-nav__item">
<a class="ds-c-vertical-nav__label ds-c-vertical-nav__label--current" href="javascript:void(0);">Current page</a>
<button class="ds-c-vertical-nav__label ds-c-vertical-nav__label--current ds-c-vertical-nav__label--parent" title="Collapse sub-navigation" aria-expanded="true">Current page</button>
<ul class="ds-c-vertical-nav__subnav">
<li class="ds-c-vertical-nav__item">
<a class="ds-c-vertical-nav__label" href="javascript:void(0);">Child link</a>
</li>
<li class="ds-c-vertical-nav__item">
<a class="ds-c-vertical-nav__label" href="javascript:void(0);">Child link</a>
<button class="ds-c-vertical-nav__label ds-c-vertical-nav__label--current ds-c-vertical-nav__label--parent" title="Collapse sub-navigation" aria-expanded="true">Child link</button>
<ul class="ds-c-vertical-nav__subnav">
<li class="ds-c-vertical-nav__item">
<a class="ds-c-vertical-nav__label" href="javascript:void(0);">Grandchild link</a>
Expand Down

0 comments on commit cb2c449

Please sign in to comment.