-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added navigation section to components (#189)
* feat: added navigation section to components * feat: changed components list
- Loading branch information
1 parent
d0cd4a9
commit 8949d84
Showing
9 changed files
with
82 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import {dateComponents} from './date-components'; | ||
import {navigationComponents} from './navigation'; | ||
import type {Lib} from './types'; | ||
import {uikit} from './uikit'; | ||
|
||
export type {SandboxType, SandboxProps, Component} from './types'; | ||
|
||
export const libs: Lib[] = [uikit, dateComponents]; | ||
export const libs: Lib[] = [uikit, dateComponents, navigationComponents]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {Component} from '../../types'; | ||
|
||
export const actionBarConfig: Component = { | ||
id: 'action-bar', | ||
title: 'Action Bar', | ||
isComingSoon: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {Component} from '../../types'; | ||
|
||
export const allPagesPanelConfig: Component = { | ||
id: 'all-pages-panel', | ||
title: 'All Pages Panel', | ||
isComingSoon: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {Component} from '../../types'; | ||
|
||
export const asideHeaderConfig: Component = { | ||
id: 'aside-header', | ||
title: 'Aside Header', | ||
isComingSoon: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {Component} from '../../types'; | ||
|
||
export const drawerConfig: Component = { | ||
id: 'drawer', | ||
title: 'Drawer', | ||
isComingSoon: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {Component} from '../../types'; | ||
|
||
export const hotkeysPanelConfig: Component = { | ||
id: 'hotkeys-panel', | ||
title: 'Hotkeys Panel', | ||
isComingSoon: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {Component} from '../../types'; | ||
|
||
export const mobileHeaderConfig: Component = { | ||
id: 'mobile-header', | ||
title: 'Mobile Header', | ||
isComingSoon: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {Component} from '../../types'; | ||
|
||
export const settingsConfig: Component = { | ||
id: 'settings', | ||
title: 'Settings', | ||
isComingSoon: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import {sortBy} from 'lodash'; | ||
|
||
import {getLibById} from '../../../utils'; | ||
import {Component, Lib} from '../types'; | ||
|
||
import {actionBarConfig} from './ActionBar'; | ||
import {allPagesPanelConfig} from './AllPagesPanel'; | ||
import {asideHeaderConfig} from './AsideHeader'; | ||
import {drawerConfig} from './Drawer'; | ||
import {hotkeysPanelConfig} from './HotkeysPanel'; | ||
import {mobileHeaderConfig} from './MobileHeader'; | ||
import {settingsConfig} from './Settings'; | ||
|
||
const {config} = getLibById('navigation'); | ||
|
||
const components: Component[] = [ | ||
actionBarConfig, | ||
allPagesPanelConfig, | ||
asideHeaderConfig, | ||
drawerConfig, | ||
hotkeysPanelConfig, | ||
mobileHeaderConfig, | ||
settingsConfig, | ||
]; | ||
|
||
export const navigationComponents: Lib = { | ||
id: config.id, | ||
title: config.title, | ||
primary: config.primary, | ||
components: sortBy(components, 'title'), | ||
}; |