Skip to content

Commit

Permalink
feat(addon-doc): support target property for links
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Feb 26, 2024
1 parent f8607a1 commit d26706d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
tuiOption
[fragment]="item.fragment"
[routerLink]="item.route"
[target]="item.target"
(click)="onClick(input)"
>
{{ item.title }}
Expand Down Expand Up @@ -82,6 +83,7 @@
tuiLink
class="t-sublink"
[routerLink]="item.route"
[target]="item.target"
[tuiScrollIntoViewLink]="isActive(item.route)"
(click)="closeMenu()"
>
Expand Down Expand Up @@ -130,6 +132,7 @@
class="t-sublink t-sublink_small"
[fragment]="subPage.fragment"
[routerLink]="subPage.route"
[target]="item.target"
[tuiScrollIntoViewLink]="isActive(subPage.route)"
(click)="closeMenu()"
>
Expand Down
1 change: 1 addition & 0 deletions projects/addon-doc/interfaces/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export interface TuiDocPage extends TuiDocPageBase {
readonly keywords?: string;
readonly route: string;
readonly icon?: PolymorpheusContent;
readonly target?: '_blank' | '_parent' | '_self' | '_top';
}

export interface TuiDocPageGroup extends TuiDocPageBase {
Expand Down
2 changes: 2 additions & 0 deletions projects/demo/src/modules/app/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export const pages: TuiDocPages = [
title: 'StackBlitz',
keywords: 'reproduce, issue, bug, sandbox, playground, test',
route: '/stackblitz',
target: '_blank',
icon: 'tuiIconExternalLink',
},
{
section: 'Documentation',
Expand Down

0 comments on commit d26706d

Please sign in to comment.