Skip to content

Commit

Permalink
chore(demo): refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Oct 22, 2023
1 parent 6e72fbb commit 864b821
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export class ExampleTuiBreakpointComponent {
injectService = import('./examples/inject-service.md?raw');

readonly example: TuiDocExample = {
TypeScript: import('./examples/1/component.ts?raw'),
HTML: import('./examples/1/template.html?raw'),
TypeScript: import('./examples/1/index.ts?raw'),
HTML: import('./examples/1/index.html?raw'),
LESS: import('./examples/1/index.less?raw'),
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import {RouterModule} from '@angular/router';
import {TuiAddonDocModule, tuiGenerateRoutes} from '@taiga-ui/addon-doc';

import {ExampleTuiBreakpointComponent} from './breakpoint.component';
import {TuiBreakpointExample} from './examples/1/component';
import {TuiBreakpointExample1} from './examples/1';

@NgModule({
imports: [
CommonModule,
TuiAddonDocModule,
RouterModule.forChild(tuiGenerateRoutes(ExampleTuiBreakpointComponent)),
],
declarations: [ExampleTuiBreakpointComponent, TuiBreakpointExample],
declarations: [ExampleTuiBreakpointComponent, TuiBreakpointExample1],
exports: [ExampleTuiBreakpointComponent],
})
export class ExampleTuiBreakpointModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
i18n-heading
[content]="example"
>
<tui-breakpoint-example></tui-breakpoint-example>
<tui-breakpoint-example-1></tui-breakpoint-example-1>
</tui-doc-example>
</ng-template>
<ng-template pageTab="Setup">
Expand All @@ -24,7 +24,7 @@
</p>

<tui-doc-code
filename="myComponent.component.ts"
filename="my.component.ts"
[code]="injectService"
></tui-doc-code>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiBreakpointService} from '@taiga-ui/core';

@Component({
selector: `tui-breakpoint-example`,
templateUrl: `./template.html`,
styleUrls: [`./style.less`],
selector: 'tui-breakpoint-example-1',
templateUrl: './index.html',
styleUrls: ['./index.less'],
changeDetection,
encapsulation,
})
export class TuiBreakpointExample {
export class TuiBreakpointExample1 {
constructor(
@Inject(TuiBreakpointService) readonly breakpoint$: TuiBreakpointService,
@Inject(TuiBreakpointService)
readonly breakpoint$: TuiBreakpointService,
) {}
}

0 comments on commit 864b821

Please sign in to comment.