Refactor #5175 - IconField component added

This commit is contained in:
tugcekucukoglu 2024-01-30 11:02:22 +03:00
parent 355bbebe7e
commit 0f2aa807bd
7 changed files with 221 additions and 0 deletions

View file

@ -0,0 +1,41 @@
import BaseStyle from 'primevue/base/style';
const css = `
@layer primevue {
.p-input-icon-left,
.p-input-icon-right {
position: relative;
display: inline-block;
}
.p-input-icon-left > i,
.p-input-icon-left > svg,
.p-input-icon-right > i,
.p-input-icon-right > svg {
position: absolute;
top: 50%;
margin-top: -.5rem;
}
.p-fluid .p-input-icon-left,
.p-fluid .p-input-icon-right {
display: block;
width: 100%;
}
}
`;
const classes = {
root: ({ props }) => [
{
'p-input-icon-right': props.iconPosition === 'right',
'p-input-icon-left': props.iconPosition === 'left'
}
]
};
export default BaseStyle.extend({
name: 'iconfield',
css,
classes
});