Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(addon-doc): support target property for links #6874

Merged
merged 4 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 1 addition & 0 deletions projects/demo/src/modules/app/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const pages: TuiDocPages = [
title: 'StackBlitz',
keywords: 'reproduce, issue, bug, sandbox, playground, test',
route: '/stackblitz',
target: '_blank',
},
{
section: 'Documentation',
Expand Down
Loading