Skip to content

Commit

Permalink
Fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Dec 28, 2023
1 parent ad15d71 commit ddff37d
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions src/app/showcase/doc/menu/customdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,17 @@ import { Code } from '../../domain/code';
<div class="card flex justify-content-center">
<p-menu [model]="items">
<ng-template pTemplate="item" let-item>
<a class="p-menuitem-link flex justify-content-between align-items-center p-3">
<a *ngIf="!item?.url" [attr.tabindex]="-1" class="p-menuitem-link flex justify-content-between align-items-center p-3" [routerLink]="item.routerLink">
<div>
<span [class]="item.icon"></span>
<span> {{ item.label }}</span>
</div>
<div>
<span *ngIf="item.shortcut" [class]="item.shortcutClass">{{ item.shortcut }}</span>
<p-badge *ngIf="item.badge" [value]="item.badge" [severity]="item.badgeSeverity"></p-badge>
</div>
</a>
<a *ngIf="item?.url" [attr.tabindex]="-1" class="p-menuitem-link flex justify-content-between align-items-center p-3" [attr.href]="item.url" [attr.target]="'blank'">
<div>
<span [class]="item.icon"></span>
<span> {{ item.label }}</span>
Expand Down Expand Up @@ -73,7 +83,17 @@ export class CustomContentDoc implements OnInit {
code: Code = {
basic: `<p-menu [model]="items">
<ng-template pTemplate="item" let-item>
<a class="p-menuitem-link flex justify-content-between align-items-center p-3">
<a *ngIf="!item?.url" [attr.tabindex]="-1" class="p-menuitem-link flex justify-content-between align-items-center p-3" [routerLink]="item.routerLink">
<div>
<span [class]="item.icon"></span>
<span> {{ item.label }}</span>
</div>
<div>
<span *ngIf="item.shortcut" [class]="item.shortcutClass">{{ item.shortcut }}</span>
<p-badge *ngIf="item.badge" [value]="item.badge" [severity]="item.badgeSeverity"></p-badge>
</div>
</a>
<a *ngIf="item?.url" [attr.tabindex]="-1" class="p-menuitem-link flex justify-content-between align-items-center p-3" [attr.href]="item.url">
<div>
<span [class]="item.icon"></span>
<span> {{ item.label }}</span>
Expand All @@ -90,7 +110,17 @@ export class CustomContentDoc implements OnInit {
<div class="card flex justify-content-center">
<p-menu [model]="items">
<ng-template pTemplate="item" let-item>
<a class="p-menuitem-link flex justify-content-between align-items-center p-3">
<a *ngIf="!item?.url" [attr.tabindex]="-1" class="p-menuitem-link flex justify-content-between align-items-center p-3" [routerLink]="item.routerLink">
<div>
<span [class]="item.icon"></span>
<span> {{ item.label }}</span>
</div>
<div>
<span *ngIf="item.shortcut" [class]="item.shortcutClass">{{ item.shortcut }}</span>
<p-badge *ngIf="item.badge" [value]="item.badge" [severity]="item.badgeSeverity"></p-badge>
</div>
</a>
<a *ngIf="item?.url" [attr.tabindex]="-1" class="p-menuitem-link flex justify-content-between align-items-center p-3" [attr.href]="item.url">
<div>
<span [class]="item.icon"></span>
<span> {{ item.label }}</span>
Expand Down

0 comments on commit ddff37d

Please sign in to comment.