mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
sidenave finished
This commit is contained in:
parent
2746249d98
commit
6be928a2d3
8 changed files with 1488 additions and 1842 deletions
|
@ -4,8 +4,13 @@
|
|||
import UIShell from './UIShell.svelte';
|
||||
import FormTest from './FormTest.svelte';
|
||||
import SettingsAdjust20 from 'carbon-icons-svelte/lib/SettingsAdjust20';
|
||||
import ChangeCatalog16 from 'carbon-icons-svelte/lib/ChangeCatalog16';
|
||||
import ManageProtection16 from 'carbon-icons-svelte/lib/ManageProtection16';
|
||||
import Recommend16 from 'carbon-icons-svelte/lib/Recommend16';
|
||||
import Settings16 from 'carbon-icons-svelte/lib/Settings16';
|
||||
import { leftPanelActions, leftPanelTypes } from './constants';
|
||||
import searchStore from './searchStore';
|
||||
import isNavItemSelectedStore from './UIShellSideNav/isNavItemSelectedStore';
|
||||
|
||||
const navMenu = [
|
||||
{
|
||||
|
@ -200,48 +205,94 @@
|
|||
subMenu: [
|
||||
{
|
||||
href: '#',
|
||||
text: 'Sub-link 1'
|
||||
text: 'Cat 1 Sub-link 1'
|
||||
},
|
||||
{
|
||||
href: '#',
|
||||
text: 'Sub-link 2'
|
||||
text: 'Cat 1 Sub-link 2'
|
||||
},
|
||||
{
|
||||
href: '#',
|
||||
text: 'Sub-link 3'
|
||||
text: 'Cat 1 Sub-link 3'
|
||||
}
|
||||
],
|
||||
icon: [
|
||||
{
|
||||
class: undefined,
|
||||
skeleton: false,
|
||||
render: ChangeCatalog16,
|
||||
title: 'Catalog',
|
||||
tabIndex: 0,
|
||||
focusable: false,
|
||||
style: undefined
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
href: '#',
|
||||
text: 'Link 2',
|
||||
subMenu: undefined
|
||||
subMenu: undefined,
|
||||
icon: [
|
||||
{
|
||||
class: undefined,
|
||||
skeleton: false,
|
||||
render: ManageProtection16,
|
||||
title: 'Protection',
|
||||
tabIndex: 0,
|
||||
focusable: false,
|
||||
style: undefined
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
href: '#',
|
||||
text: 'Link 3',
|
||||
subMenu: undefined
|
||||
subMenu: undefined,
|
||||
icon: [
|
||||
{
|
||||
class: undefined,
|
||||
skeleton: false,
|
||||
render: Recommend16,
|
||||
title: 'Recommend',
|
||||
tabIndex: 0,
|
||||
focusable: false,
|
||||
style: undefined
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
href: undefined,
|
||||
text: 'Link 4',
|
||||
text: 'Category 2',
|
||||
subMenu: [
|
||||
{
|
||||
href: '#',
|
||||
text: 'Sub-link 1'
|
||||
text: 'Cat 2 Sub-link 1'
|
||||
},
|
||||
{
|
||||
href: '#',
|
||||
text: 'Sub-link 2'
|
||||
text: 'Cat 2 Sub-link 2'
|
||||
},
|
||||
{
|
||||
href: '#',
|
||||
text: 'Sub-link 3'
|
||||
text: 'Cat 2 Sub-link 3'
|
||||
}
|
||||
],
|
||||
icon: [
|
||||
{
|
||||
class: undefined,
|
||||
skeleton: false,
|
||||
render: Settings16,
|
||||
title: 'Settings',
|
||||
tabIndex: 0,
|
||||
focusable: false,
|
||||
style: undefined
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
isNavItemSelectedStore.setStoreValues(sideNavMenu);
|
||||
|
||||
function searchInStore(event) {
|
||||
if (event.detail.action === leftPanelActions.search.actionString) {
|
||||
searchStore.search(event.detail.textInput);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue