From b0b2101adcd2ff44ab5b4b602e86bfa22dd66738 Mon Sep 17 00:00:00 2001 From: alifprihantoro Date: Sat, 23 Nov 2024 23:11:22 +0700 Subject: [PATCH] feat: add nav (#2) --- src/view/nav/Nav.stories.ts | 3 +-- src/view/nav/bottom.ts | 33 +++++++++++++++++++++++++++++++++ src/view/nav/index.ts | 15 ++++++++++++++- 3 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 src/view/nav/bottom.ts diff --git a/src/view/nav/Nav.stories.ts b/src/view/nav/Nav.stories.ts index 4eea5dc..b8f438b 100644 --- a/src/view/nav/Nav.stories.ts +++ b/src/view/nav/Nav.stories.ts @@ -2,8 +2,7 @@ import Nav from './' export default { render: () => { - return Nav + return Nav('/', 'Serabi Ngampin Bu Yuni') }, } export const nav = {} - diff --git a/src/view/nav/bottom.ts b/src/view/nav/bottom.ts new file mode 100644 index 0000000..f4d2162 --- /dev/null +++ b/src/view/nav/bottom.ts @@ -0,0 +1,33 @@ +import List from '../../configs/links/nav' + +let LIST_LINK = '' +for (let i = 0; i < List.length; i++) { + const { name, url, icon } = List[i] + LIST_LINK += html` +
  • + + ${icon} + ${name} + +
  • + ` +} +export default html` + +` diff --git a/src/view/nav/index.ts b/src/view/nav/index.ts index f472024..4dcd823 100644 --- a/src/view/nav/index.ts +++ b/src/view/nav/index.ts @@ -1 +1,14 @@ -export default html`
    hello world
    ` +import NavBottom from './bottom' + +export default function Nav(url: string, title: string) { + return html` + + ` +}