Calculations for the icon field inputs

pull/5701/head
Cagatay Civici 2024-05-08 10:32:33 +03:00
parent 7b3d8d467b
commit c493f0d22a
5 changed files with 11 additions and 11 deletions

View File

@ -151,16 +151,16 @@ const theme = ({ dt }) => `
} }
.p-text-secondary { .p-text-secondary {
color: #64748b; color: ${dt('text.muted.color')};
} }
.pi { .pi {
font-size: 1rem; font-size: ${dt('icon.size')};
} }
.p-icon { .p-icon {
width: 1rem; width: ${dt('icon.size')};
height: 1rem; height: ${dt('icon.size')};
} }
.p-link { .p-link {

View File

@ -8,24 +8,24 @@ const theme = ({ dt }) => `
.p-inputicon { .p-inputicon {
position: absolute; position: absolute;
top: 50%; top: 50%;
margin-top: -.5rem; margin-top: calc(-1 * (${dt('icon.size')} / 2));
color: ${dt('iconfield.icon.color')}; color: ${dt('iconfield.icon.color')};
} }
.p-iconfield .p-inputicon:first-child { .p-iconfield .p-inputicon:first-child {
left: 0.75rem; left: ${dt('form.field.padding.x')};
} }
.p-iconfield .p-inputicon:last-child { .p-iconfield .p-inputicon:last-child {
right: 0.75rem; right: ${dt('form.field.padding.x')};
} }
.p-iconfield .p-inputtext:last-child { .p-iconfield .p-inputtext:last-child {
padding-left: 2.5rem; padding-left: calc((${dt('form.field.padding.x')} * 2) + ${dt('icon.size')});
} }
.p-iconfield .p-inputtext:first-child { .p-iconfield .p-inputtext:first-child {
padding-right: 2.5rem; padding-right:calc((${dt('form.field.padding.x')} * 2) + ${dt('icon.size')});
} }
`; `;

View File

@ -119,8 +119,6 @@ input.p-select-label {
.p-select-filter { .p-select-filter {
width: 100%; width: 100%;
padding-right: 1.75rem;
margin-right: -1.75rem;
} }
.p-select-list-container { .p-select-list-container {

View File

@ -126,6 +126,7 @@ export default {
offset: '2px', offset: '2px',
shadow: 'none' shadow: 'none'
}, },
iconSize: '1rem',
anchorGutter: '2px', anchorGutter: '2px',
primary: { primary: {
50: '{emerald.50}', 50: '{emerald.50}',

View File

@ -125,6 +125,7 @@ export default {
color: 'transparent', color: 'transparent',
offset: '0' offset: '0'
}, },
iconSize: '1rem',
anchorGutter: '2px', anchorGutter: '2px',
primary: { primary: {
50: '{emerald.50}', 50: '{emerald.50}',