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

chore(demo): fix broken link for documentation page Mode #7185

Merged
merged 1 commit into from
Apr 8, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions projects/addon-doc/components/demo/demo.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
>
<ng-template #tooltip>
{{ texts[0] }}
<!-- TODO: @taiga-ui/addon-doc should not include relative link of Taiga UI demo application -->
<a
routerLink="/directives/mode"
tuiLink
Expand Down
2 changes: 1 addition & 1 deletion projects/demo/src/modules/app/demo-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export const DemoRoute = {
Validator: 'directives/validator',
ValueChanges: 'directives/value-changes',
Media: 'media',
Mode: 'mode',
Mode: 'directives/mode',
AutoFocus: 'directives/auto-focus',
Currency: 'pipes/currency',
FilterPipe: 'pipes/filter',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
<form [formGroup]="testForm">
<tui-notification>
Custom mode is set with
<a
routerLink="/directives/mode"
tuiLink
>
<code>tuiMode</code>
</a>
directive
</tui-notification>

<p>
<tui-input
formControlName="testValue"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type {TemplateRef} from '@angular/core';
import {Component, ViewChild} from '@angular/core';
import {FormControl, Validators} from '@angular/forms';
import {changeDetection} from '@demo/emulate/change-detection';
import {DemoRoute} from '@demo/routes';
import type {TuiDocExample} from '@taiga-ui/addon-doc';
import {tuiProvide} from '@taiga-ui/cdk';
import type {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';
Expand Down Expand Up @@ -43,6 +44,8 @@ export class ExampleTuiInputComponent extends AbstractExampleTuiControl {

protected readonly exampleForm = import('./examples/import/declare-form.md?raw');

protected modeDocPage = `/${DemoRoute.Mode}`;

protected readonly example1: TuiDocExample = {
TypeScript: import('./examples/1/index.ts?raw'),
HTML: import('./examples/1/index.html?raw'),
Expand Down
10 changes: 10 additions & 0 deletions projects/demo/src/modules/components/input/input.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,16 @@
heading="Modes"
[content]="example5"
>
<tui-notification>
Custom mode is set with
<a
tuiLink
[routerLink]="modeDocPage"
>
<code>tuiMode</code>
</a>
directive
</tui-notification>
<tui-input-example-5 />
</tui-doc-example>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {DemoRoute} from '@demo/routes';

@Component({
selector: 'example-tui-theme-night',
templateUrl: './theme-night.template.html',
changeDetection,
})
export class ExampleTuiThemeNightComponent {
protected modeDocPage = `/${DemoRoute.Mode}`;

protected readonly exampleModule = import('./examples/import/import-module.md?raw');
protected readonly exampleComponent = import(
'./examples/import/insert-component.md?raw'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
</a>
that you can use together with
<a
routerLink="/directives/mode"
tuiLink
[routerLink]="modeDocPage"
>
<code>Mode</code>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<code>[data-mode='onLight']</code>
selectors to account for
<a
routerLink="/directives/mode"
tuiLink
[routerLink]="modeDocPage"
>
Mode
</a>
Expand Down
3 changes: 3 additions & 0 deletions projects/demo/src/modules/customization/wrapper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {NgForOf} from '@angular/common';
import {Component, ViewEncapsulation} from '@angular/core';
import {RouterLink} from '@angular/router';
import {changeDetection} from '@demo/emulate/change-detection';
import {DemoRoute} from '@demo/routes';
import {
TuiDocCopyModule,
type TuiDocExample,
Expand Down Expand Up @@ -30,6 +31,8 @@ import {TuiWrapperExample1} from './examples/1';
changeDetection,
})
export default class PageComponent {
protected modeDocPage = `/${DemoRoute.Mode}`;

protected readonly example1: TuiDocExample = {
HTML: import('./examples/1/index.html?raw'),
LESS: import('./examples/1/index.less?raw'),
Expand Down