From 0d4617232550031b5552059f90bfef53631aee56 Mon Sep 17 00:00:00 2001 From: ncoronel Date: Fri, 26 Jun 2026 10:18:43 -0300 Subject: [PATCH] feat: enhance input component layout with labels and improve styling --- .../reutilizables-test-page.component.html | 236 ++++++++++-------- .../reutilizables-test-page.component.scss | 5 + .../components/input/input.component.html | 8 +- .../components/input/input.component.scss | 6 - .../components/input/input.component.ts | 4 +- src/styles.scss | 6 + 6 files changed, 146 insertions(+), 119 deletions(-) diff --git a/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.html b/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.html index 6971007..af58a90 100644 --- a/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.html +++ b/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.html @@ -45,124 +45,150 @@
- - Texto - +
+ + +
- - Numero - +
+ + +
- - Email - +
+ + +
- - Usuario - +
+ + +
- - Password - +
+ + +
- - Fecha - +
+ + +
- - Periodo - +
+ + +
- - Moneda - +
+ + +
- - Porcentaje - +
+ + +
- - Deshabilitado - +
+ + +
- - Editable - +
+ + +
- - Invalido - +
+ + +
- - Archivo - +
+ + +
Limpiar archivo
diff --git a/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.scss b/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.scss index 5cfdf9d..3f5ad41 100644 --- a/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.scss +++ b/src/app/features/componentes-test/pages/reutilizables-test-page/reutilizables-test-page.component.scss @@ -65,6 +65,11 @@ h1 { gap: 1rem; } +.input-field { + display: grid; + gap: 0; +} + .file-field { display: grid; gap: 0.75rem; diff --git a/src/app/shared/components/input/input.component.html b/src/app/shared/components/input/input.component.html index 5d0a41a..26b72af 100644 --- a/src/app/shared/components/input/input.component.html +++ b/src/app/shared/components/input/input.component.html @@ -1,7 +1,3 @@ - -
(''); readonly maxlength = input(null); @@ -85,8 +87,6 @@ export class InputComponent { readonly fileChange = output(); readonly visibleChange = output(); - protected readonly id = `app-input-${globalThis.crypto.randomUUID()}`; - protected readonly inputType = computed(() => { const type = this.type(); diff --git a/src/styles.scss b/src/styles.scss index 44da8f6..cf4021c 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -10,3 +10,9 @@ :root { --bs-body-font-family: "Gotham", sans-serif; } + +label { + display: block; + margin-bottom: 0.375rem; + font-weight: 500; +}