From f200bed5324e78aefe82978c472d2b3ef2479089 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Mon, 30 Sep 2024 10:49:40 +0300 Subject: [PATCH] Button alignment on material inputnumber --- .../themes/src/presets/material/inputnumber/index.js | 11 +++++++++-- .../themes/src/presets/material/inputtext/index.js | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/themes/src/presets/material/inputnumber/index.js b/packages/themes/src/presets/material/inputnumber/index.js index cf5d01100..dea2876c0 100644 --- a/packages/themes/src/presets/material/inputnumber/index.js +++ b/packages/themes/src/presets/material/inputnumber/index.js @@ -3,7 +3,7 @@ export default { transitionDuration: '{transition.duration}' }, button: { - width: '2.5rem', + width: '3rem', borderRadius: '{form.field.border.radius}', verticalPadding: '{form.field.padding.y}' }, @@ -34,5 +34,12 @@ export default { activeColor: '{surface.200}' } } - } + }, + style: ({ dt }) => ` +.p-inputnumber-stacked .p-inputnumber-button-group { + top: 2px; + right: 2px; + height: calc(100% - 4px); +} +` }; diff --git a/packages/themes/src/presets/material/inputtext/index.js b/packages/themes/src/presets/material/inputtext/index.js index e9c4d77dc..8f130ac14 100644 --- a/packages/themes/src/presets/material/inputtext/index.js +++ b/packages/themes/src/presets/material/inputtext/index.js @@ -78,5 +78,5 @@ export default { .p-inputtext.p-variant-filled.p-invalid:enabled:focus { background-image: linear-gradient(to bottom, ${dt('inputtext.invalid.border.color')}, ${dt('inputtext.invalid.border.color')}), linear-gradient(to bottom, ${dt('inputtext.invalid.border.color')}, ${dt('inputtext.invalid.border.color')}); } - ` +` };