primevue-mirror/components/lib/iconfield/style/IconFieldStyle.js

41 lines
817 B
JavaScript
Raw Normal View History

import BaseStyle from 'primevue/base/style';
const theme = ({ dt }) => `
.p-iconfield {
position: relative;
}
.p-inputicon {
position: absolute;
top: 50%;
2024-05-08 07:32:33 +00:00
margin-top: calc(-1 * (${dt('icon.size')} / 2));
2024-05-05 16:14:09 +00:00
color: ${dt('iconfield.icon.color')};
}
.p-iconfield .p-inputicon:first-child {
2024-05-08 07:32:33 +00:00
left: ${dt('form.field.padding.x')};
}
.p-iconfield .p-inputicon:last-child {
2024-05-08 07:32:33 +00:00
right: ${dt('form.field.padding.x')};
}
.p-iconfield .p-inputtext:last-child {
2024-05-08 07:32:33 +00:00
padding-left: calc((${dt('form.field.padding.x')} * 2) + ${dt('icon.size')});
}
.p-iconfield .p-inputtext:first-child {
2024-05-08 07:32:33 +00:00
padding-right:calc((${dt('form.field.padding.x')} * 2) + ${dt('icon.size')});
}
`;
const classes = {
2024-04-08 10:43:16 +00:00
root: 'p-iconfield'
};
export default BaseStyle.extend({
name: 'iconfield',
theme,
classes
});