conversion inputs to components

This commit is contained in:
2024-08-02 20:14:07 +02:00
parent 29f88d610f
commit c9305749d2
28 changed files with 528 additions and 300 deletions

View File

@@ -3,21 +3,17 @@ import { Component, forwardRef } from '@angular/core';
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
import { QuillModule } from 'ngx-quill';
import { BaseInputComponent } from '../base-input/base-input.component';
import { TooltipComponent } from '../tooltip/tooltip.component';
import { ValidationMessagesService } from '../validation-messages.service';
@Component({
selector: 'app-validated-quill',
template: `
<div>
<label [for]="name" class="block text-sm font-medium text-gray-700">
{{ label }}
<span class="text-red-500 ml-1">{{ validationMessage }}</span>
</label>
<quill-editor [(ngModel)]="value" (ngModelChange)="onInputChange($event)" (onBlur)="onTouched()" [id]="name" [attr.name]="name" [modules]="quillModules"></quill-editor>
</div>
`,
templateUrl: './validated-quill.component.html',
styles: `quill-editor {
width: 100%;
}`,
standalone: true,
imports: [CommonModule, FormsModule, QuillModule],
imports: [CommonModule, FormsModule, QuillModule, TooltipComponent],
providers: [
{
provide: NG_VALUE_ACCESSOR,