Skip to content

Commit

Permalink
feat: added navigation section to components (#189)
Browse files Browse the repository at this point in the history
* feat: added navigation section to components

* feat: changed components list
  • Loading branch information
vvtimofeev authored Mar 30, 2024
1 parent d0cd4a9 commit 8949d84
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/content/components/index.ts
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];
7 changes: 7 additions & 0 deletions src/content/components/navigation/ActionBar/index.ts
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,
};
7 changes: 7 additions & 0 deletions src/content/components/navigation/AllPagesPanel/index.ts
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,
};
7 changes: 7 additions & 0 deletions src/content/components/navigation/AsideHeader/index.ts
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,
};
7 changes: 7 additions & 0 deletions src/content/components/navigation/Drawer/index.ts
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,
};
7 changes: 7 additions & 0 deletions src/content/components/navigation/HotkeysPanel/index.ts
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,
};
7 changes: 7 additions & 0 deletions src/content/components/navigation/MobileHeader/index.ts
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,
};
7 changes: 7 additions & 0 deletions src/content/components/navigation/Settings/index.ts
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,
};
31 changes: 31 additions & 0 deletions src/content/components/navigation/index.ts
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'),
};

0 comments on commit 8949d84

Please sign in to comment.