From 96fc148488e5edfb49e542b88d0cd7d35c4798ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87etin?= <92744169+mehmetcetin01140@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:19:35 +0300 Subject: [PATCH] revert demo changes --- src/app/showcase/doc/tabmenu/basicdoc.ts | 24 ++++-------- src/app/showcase/pages/tabmenu/tabmenudemo.ts | 39 +++++++++++++++++-- 2 files changed, 44 insertions(+), 19 deletions(-) diff --git a/src/app/showcase/doc/tabmenu/basicdoc.ts b/src/app/showcase/doc/tabmenu/basicdoc.ts index f44b6f99713..02c254f0589 100644 --- a/src/app/showcase/doc/tabmenu/basicdoc.ts +++ b/src/app/showcase/doc/tabmenu/basicdoc.ts @@ -1,4 +1,4 @@ -import { ChangeDetectorRef, Component, OnInit } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; import { MenuItem } from 'primeng/api'; import { Code } from '@domain/code'; @@ -9,7 +9,7 @@ import { Code } from '@domain/code';

TabMenu requires a collection of menuitems as its model.

- +
` @@ -17,21 +17,13 @@ import { Code } from '@domain/code'; export class BasicDoc implements OnInit { items: MenuItem[] | undefined; - activeItem: MenuItem | undefined; - - constructor(private cd:ChangeDetectorRef){ - - } - ngOnInit() { - this.items = Array.from({ length: 50 }, (_, i) => ({ - label: `Tab ${i + 1}`, - })); - - setTimeout((_) => { - this.activeItem = this.items[40]; - this.cd.markForCheck() - }, 2000); + this.items = [ + { label: 'Dashboard', icon: 'pi pi-home' }, + { label: 'Transactions', icon: 'pi pi-chart-line' }, + { label: 'Products', icon: 'pi pi-list' }, + { label: 'Messages', icon: 'pi pi-inbox' } + ]; } code: Code = { diff --git a/src/app/showcase/pages/tabmenu/tabmenudemo.ts b/src/app/showcase/pages/tabmenu/tabmenudemo.ts index 1fd5ce417e1..24b8427b437 100755 --- a/src/app/showcase/pages/tabmenu/tabmenudemo.ts +++ b/src/app/showcase/pages/tabmenu/tabmenudemo.ts @@ -13,12 +13,45 @@ import { RouterDoc } from '@doc/tabmenu/routerdoc'; }) export class TabMenuDemo { docs = [ - + { + id: 'import', + label: 'Import', + component: ImportDoc + }, { id: 'basic', label: 'Basic', component: BasicDoc }, - + { + id: 'controlled', + label: 'Controlled', + component: ControlledDoc + }, + { + id: 'template', + label: 'Template', + component: TemplateDoc + }, + { + id: 'command', + label: 'Command', + component: CommandDoc + }, + { + id: 'router', + label: 'Router', + component: RouterDoc + }, + { + id: 'style', + label: 'Style', + component: StyleDoc + }, + { + id: 'accessibility', + label: 'Accessibility', + component: AccessibilityDoc + } ]; -} +} \ No newline at end of file