Skip to content

Commit

Permalink
chore(demo): migrate documentation page stepper to standalone compo…
Browse files Browse the repository at this point in the history
…nents
  • Loading branch information
AlexeyPortnyagin committed Mar 27, 2024
1 parent 9a23e3a commit ea4a65c
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 39 deletions.
12 changes: 4 additions & 8 deletions projects/demo/src/modules/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1010,15 +1010,11 @@ export const ROUTES: Routes = [
title: 'Slider',
},
},
{
route({
path: 'navigation/stepper',
loadChildren: async () =>
(await import('../components/stepper/stepper.module'))
.ExampleTuiStepperModule,
data: {
title: 'Stepper',
},
},
loadComponent: async () => import('../components/stepper/stepper.component'),
title: 'Stepper',
}),
{
path: 'components/preview',
loadChildren: async () =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiStepperModule} from '@taiga-ui/kit';

@Component({
standalone: true,
selector: 'tui-stepper-example-1',
imports: [TuiStepperModule],
templateUrl: './index.html',
encapsulation,
changeDetection,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import {NgForOf} from '@angular/common';
import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiStepperModule} from '@taiga-ui/kit';

@Component({
standalone: true,
selector: 'tui-stepper-example-2',
imports: [TuiStepperModule, NgForOf],
templateUrl: './index.html',
encapsulation,
changeDetection,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import {NgForOf} from '@angular/common';
import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiStepperModule} from '@taiga-ui/kit';

@Component({
standalone: true,
selector: 'tui-stepper-example-3',
imports: [TuiStepperModule, NgForOf],
templateUrl: './index.html',
styleUrls: ['./index.less'],
encapsulation,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import type {TuiDocExample} from '@taiga-ui/addon-doc';
import {TuiAddonDocModule} from '@taiga-ui/addon-doc';
import type {TuiOrientation} from '@taiga-ui/core';
import type {TuiStepState} from '@taiga-ui/kit';
import {TuiStepperModule} from '@taiga-ui/kit';

import {TuiStepperExample1} from './examples/1';
import {TuiStepperExample2} from './examples/2';
import {TuiStepperExample3} from './examples/3';

@Component({
standalone: true,
selector: 'example-tui-stepper',
imports: [
TuiStepperExample1,
TuiStepperExample2,
TuiStepperExample3,
TuiStepperModule,
TuiAddonDocModule,
],
templateUrl: './stepper.template.html',
changeDetection,
})
export class ExampleTuiStepperComponent {
export default class ExampleTuiStepperComponent {
protected readonly exampleModule = import('./examples/import/import-module.md?raw');
protected readonly exampleHtml = import('./examples/import/insert-template.md?raw');

Expand Down
30 changes: 0 additions & 30 deletions projects/demo/src/modules/components/stepper/stepper.module.ts

This file was deleted.

0 comments on commit ea4a65c

Please sign in to comment.