Skip to content

Commit

Permalink
chore(demo): migrate documentation page BadgeNotification to standa…
Browse files Browse the repository at this point in the history
…lone components (#6996)
  • Loading branch information
KrollikRoddzer authored Mar 18, 2024
1 parent 43d5624 commit 1afe7a5
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 39 deletions.
13 changes: 5 additions & 8 deletions projects/demo/src/modules/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,15 +239,12 @@ export const ROUTES: Routes = [
title: 'CardLarge',
},
},
{
route({
path: 'components/badge-notification',
loadChildren: async () =>
(await import('../components/badge-notification/badge-notification.module'))
.ExampleTuiBadgeNotificationModule,
data: {
title: 'BadgeNotification',
},
},
loadComponent: async () =>
import('../components/badge-notification/badge-notification.component'),
title: 'BadgeNotification',
}),
{
path: 'experimental/button',
loadChildren: async () =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import type {TuiRawLoaderContent} from '@taiga-ui/addon-doc';
import {TuiExamplePipe} from '@demo/utils';
import {TuiAddonDocModule, type TuiRawLoaderContent} from '@taiga-ui/addon-doc';
import type {TuiSizeL, TuiSizeXS} from '@taiga-ui/core';
import {TuiBadgeNotificationComponent} from '@taiga-ui/kit';

import {TuiBadgeNotificationExample1} from './examples/1';
import {TuiBadgeNotificationExample2} from './examples/2';

@Component({
standalone: true,
selector: 'example-badge-notification',
imports: [
TuiBadgeNotificationComponent,
TuiExamplePipe,
TuiAddonDocModule,
TuiBadgeNotificationExample1,
TuiBadgeNotificationExample2,
],
templateUrl: './badge-notification.template.html',
changeDetection,
})
export class ExampleTuiBadgeNotificationComponent {
export default class ExampleTuiBadgeNotificationComponent {
protected readonly exampleModule: TuiRawLoaderContent = import(
'./examples/import/import-module.md?raw'
);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiPlatformModule} from '@taiga-ui/cdk';
import {TuiBadgeNotificationComponent} from '@taiga-ui/kit';

@Component({
standalone: true,
selector: 'tui-badge-notification-example-1',
imports: [TuiPlatformModule, TuiBadgeNotificationComponent],
templateUrl: './index.html',
styleUrls: ['./index.less'],
encapsulation,
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 {TuiBadgeNotificationComponent} from '@taiga-ui/kit';

@Component({
standalone: true,
selector: 'tui-badge-notification-example-2',
imports: [TuiBadgeNotificationComponent],
templateUrl: './index.html',
styleUrls: ['./index.less'],
encapsulation,
Expand Down

0 comments on commit 1afe7a5

Please sign in to comment.