Skip to content

Commit

Permalink
refactor(addon-doc): remove internal TuiDocExampleCapitalizePipe (#…
Browse files Browse the repository at this point in the history
…6102)

Co-authored-by: taiga-family-bot <[email protected]>
  • Loading branch information
splincode and taiga-family-bot authored Nov 27, 2023
1 parent 2cb4e62 commit d265c64
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 26 deletions.
11 changes: 0 additions & 11 deletions projects/addon-doc/components/example/example-capitalize.pipe.ts

This file was deleted.

13 changes: 2 additions & 11 deletions projects/addon-doc/components/example/example.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';
import {TuiDocCodeModule} from '../code/code.module';
import {TuiDocCopyModule} from '../copy/copy.module';
import {TuiDocExampleComponent} from './example.component';
import {TuiDocExampleCapitalizePipe} from './example-capitalize.pipe';
import {TuiDocExampleGetTabsPipe} from './example-get-tabs.pipe';

@NgModule({
Expand All @@ -24,15 +23,7 @@ import {TuiDocExampleGetTabsPipe} from './example-get-tabs.pipe';
TuiMapperPipeModule,
TuiLoaderModule,
],
declarations: [
TuiDocExampleComponent,
TuiDocExampleGetTabsPipe,
TuiDocExampleCapitalizePipe,
],
exports: [
TuiDocExampleComponent,
TuiDocExampleGetTabsPipe,
TuiDocExampleCapitalizePipe,
],
declarations: [TuiDocExampleComponent, TuiDocExampleGetTabsPipe],
exports: [TuiDocExampleComponent, TuiDocExampleGetTabsPipe],
})
export class TuiDocExampleModule {}
5 changes: 5 additions & 0 deletions projects/addon-doc/components/example/example.style.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
margin: 0;
}

.t-title:first-letter,
.t-description:first-letter {
text-transform: capitalize;
}

.t-example {
position: relative;
margin-top: 1.5rem;
Expand Down
4 changes: 2 additions & 2 deletions projects/addon-doc/components/example/example.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class="t-title"
>
<span
*polymorpheusOutlet="heading | tuiDocExampleCapitalize as text"
*polymorpheusOutlet="heading as text"
[textContent]="text"
></span>
<button
Expand All @@ -22,7 +22,7 @@
*ngIf="description"
class="t-description"
>
<ng-container *polymorpheusOutlet="description | tuiDocExampleCapitalize as text">
<ng-container *polymorpheusOutlet="description as text">
{{ text }}
</ng-container>
</h4>
Expand Down
1 change: 0 additions & 1 deletion projects/addon-doc/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export * from './documentation/pipes/strip-optional.pipe';
export * from './example/example.component';
export * from './example/example.module';
export * from './example/example.options';
export * from './example/example-capitalize.pipe';
export * from './example/example-get-tabs.pipe';
export * from './internal/header/header.component';
export * from './internal/header/header.module';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
margin-bottom: 0.5rem;
}

.title::first-letter {
text-transform: capitalize;
}

.copy {
.fullsize();
.transition(opacity);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
<th
*ngFor="let column of columnsNames"
tuiTh
class="title"
>
{{ column | tuiDocExampleCapitalize }}
{{ column }}
</th>
</tr>
</thead>
Expand Down

0 comments on commit d265c64

Please sign in to comment.