Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Jul 1, 2024
1 parent 747b298 commit ba34ef0
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/demo/src/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {TUI_EDITOR_DEFAULT_EXTENSIONS, TUI_EDITOR_EXTENSIONS} from '@tinkoff/tui

export const appConfig: ApplicationConfig = {
providers: [
provideClientHydration(),
provideAnimations(),
provideRouter([
{
Expand All @@ -23,7 +24,6 @@ export const appConfig: ApplicationConfig = {
loadComponent: async () => import('./home/home.component'),
},
]),
provideClientHydration(),
importProvidersFrom(
TuiRootModule,
TuiAlertModule,
Expand Down
18 changes: 17 additions & 1 deletion apps/demo/src/app/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ <h2 class="title">
</div>
</div>

<tui-editor [tools]="builtInTools">Typing...</tui-editor>
<tui-editor
[tools]="builtInTools"
[(ngModel)]="editor"
>
Typing...
</tui-editor>

<ng-template
#callTemplate
Expand Down Expand Up @@ -156,3 +161,14 @@ <h3>Aleksandr Inkin</h3>
Glory
</button>
</tui-push>

<br />

<tui-accordion>
@for (item of questions; track $index) {
<tui-accordion-item [open]="true">
{{ item.question }}
<ng-template tuiAccordionItemContent>{{ item.answer }}</ng-template>
</tui-accordion-item>
}
</tui-accordion>
18 changes: 18 additions & 0 deletions apps/demo/src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
TuiTextfieldControllerModule,
} from '@taiga-ui/core';
import {
TuiAccordionModule,
TuiCheckboxLabeledModule,
TuiInputDateModule,
TuiInputTagModule,
Expand Down Expand Up @@ -52,6 +53,7 @@ import {TuiEditorModule, TuiEditorTool} from '@tinkoff/tui-editor';
TuiDropdownModule,
NgDompurifyModule,
TuiEditorModule,
TuiAccordionModule,
],
templateUrl: './home.component.html',
styleUrls: ['./home.component.less'],
Expand All @@ -69,6 +71,22 @@ export default class HomeComponent {
protected date: TuiDay | null = null;
protected notification = false;
protected slider = 80;
protected editor = '';

protected questions = [
{
question: 'Accordion 1',
answer: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget.',
},
{
question: 'Accordion 2',
answer: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget.',
},
{
question: 'Accordion 3',
answer: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget.',
},
];

protected onDay(date: TuiDay): void {
this.date = date;
Expand Down
1 change: 0 additions & 1 deletion apps/demo/src/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ html,
body {
margin: 0;
padding: 0;
overflow: hidden;
color: var(--tui-text-01);
}

Expand Down

0 comments on commit ba34ef0

Please sign in to comment.