2026-10-13 19:45:47 -05:00
|
|
|
import { Directive, booleanAttribute, input } from '@angular/core';
|
|
|
|
|
|
2026-10-13 19:49:16 -05:00
|
|
|
/** Entradas comunes de los campos con etiqueta (un solo control por fila). */
|
2026-10-13 19:45:47 -05:00
|
|
|
@Directive()
|
|
|
|
|
export abstract class FieldBase {
|
|
|
|
|
readonly label = input.required<string>();
|
|
|
|
|
readonly required = input(false, { transform: booleanAttribute });
|
|
|
|
|
readonly readOnly = input(false, { alias: 'readonly', transform: booleanAttribute });
|
|
|
|
|
readonly disabled = input(false, { transform: booleanAttribute });
|
|
|
|
|
readonly error = input<string>();
|
|
|
|
|
}
|