From 5f8ddd02a983ed28f9b7d34091dff4e362c3c47f Mon Sep 17 00:00:00 2001 From: Konstantin Skok Date: Tue, 24 Jan 2023 21:24:32 +0300 Subject: [PATCH 1/2] =?UTF-8?q?fix=20(docs/navigation)=20=D0=9F=D1=80?= =?UTF-8?q?=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=B2=20=D0=BF=D1=80=D0=B8=D0=BC?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=20live=20demo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../navigation-example.component.html | 90 +++---------------- .../navigation-example.component.ts | 16 ++-- 2 files changed, 15 insertions(+), 91 deletions(-) diff --git a/apps/doc/src/app/components/navigation/navigation-example.component.html b/apps/doc/src/app/components/navigation/navigation-example.component.html index b7e3eecc7b..c635cd5bc5 100644 --- a/apps/doc/src/app/components/navigation/navigation-example.component.html +++ b/apps/doc/src/app/components/navigation/navigation-example.component.html @@ -14,7 +14,15 @@ - - -

PrizmHeaderModuleBtnComponent

- - - - - - - Иконка - - - - Количество уведомлений - - - - Название на кнопке - - - - Статус уведомлений - - -
@@ -134,3 +63,4 @@

PrizmHeaderModuleBtnComponent

+ diff --git a/apps/doc/src/app/components/navigation/navigation-example.component.ts b/apps/doc/src/app/components/navigation/navigation-example.component.ts index 1d9c5f4f83..c3e508a761 100644 --- a/apps/doc/src/app/components/navigation/navigation-example.component.ts +++ b/apps/doc/src/app/components/navigation/navigation-example.component.ts @@ -1,6 +1,7 @@ import { Component, ChangeDetectionStrategy } from '@angular/core'; import { RawLoaderContent, TuiDocExample } from '@taiga-ui/addon-doc'; -import { IconDefs, IndicatorStatus, PrizmContent } from '@prizm-ui/components'; +import { IconDefs, INavigationTree, IndicatorStatus, PrizmContent } from '@prizm-ui/components'; +import { NAVIGATION_EXAMPLE } from './navigation-example.const'; @Component({ selector: 'prizm-navigation-example', @@ -17,14 +18,7 @@ export class NavigationExampleComponent { public readonly setupModule: RawLoaderContent = import('!!raw-loader!./examples/setup-module.md'); - // Navigation module btn - iconVariants: ReadonlyArray = ['', ...IconDefs.reduce((a, c) => a.concat(c.data), [])]; - public icon: PrizmContent = this.iconVariants[1]; - public alertsCount = 3; - public title = 'Название'; - public readonly statusVariants: IndicatorStatus[] = ['info', 'secondary', 'success', 'warning', 'danger']; - public status: IndicatorStatus = this.statusVariants[2]; - - // Navigation menu btn - public isActive = false; + public navigationTree: INavigationTree[] = NAVIGATION_EXAMPLE; + activeElement = NAVIGATION_EXAMPLE[1]; } + From 12e081bcaf707cdc05df1b069e0456621edb62d0 Mon Sep 17 00:00:00 2001 From: Konstantin Skok Date: Wed, 25 Jan 2023 11:38:47 +0300 Subject: [PATCH 2/2] fix (components/navigation) 404 assets/example/logo[object] --- .../navigation-basic-example.component.html | 1 + .../navigation-basic-example.component.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/doc/src/app/components/navigation/examples/navigation-basic-example/navigation-basic-example.component.html b/apps/doc/src/app/components/navigation/examples/navigation-basic-example/navigation-basic-example.component.html index 73bfbf4c8a..0b40484853 100644 --- a/apps/doc/src/app/components/navigation/examples/navigation-basic-example/navigation-basic-example.component.html +++ b/apps/doc/src/app/components/navigation/examples/navigation-basic-example/navigation-basic-example.component.html @@ -49,3 +49,4 @@ + diff --git a/apps/doc/src/app/components/navigation/examples/navigation-basic-example/navigation-basic-example.component.ts b/apps/doc/src/app/components/navigation/examples/navigation-basic-example/navigation-basic-example.component.ts index 5817737b35..397da9f9b9 100644 --- a/apps/doc/src/app/components/navigation/examples/navigation-basic-example/navigation-basic-example.component.ts +++ b/apps/doc/src/app/components/navigation/examples/navigation-basic-example/navigation-basic-example.component.ts @@ -19,7 +19,7 @@ export class NavigationBasicExampleComponent { public currentNavElementIdx = 0; public readonly logoPath$ = this.themeSwitcher.change$.pipe( - map(theme => `assets/example/logo-${theme}.png`) + map(theme => `assets/example/logo-${theme.theme}.png`) ); constructor(private readonly themeSwitcher: PrizmThemeService) {} @@ -32,3 +32,4 @@ export class NavigationBasicExampleComponent { this.currentNavElementIdx = idx; } } +