First of all, the question is really similar to this one in particular but, as the user that asked the question said, it's not entirely answered, and i would know if it's posible or not to accomplished and how, so, here's what i need to do:
I need to put elements (like text or icon images) after and before the input, at the side of the input field (not like in the example of the referenced post where the mm of the text are on absolute at the end of the container, but more like as the user black said, right next to the value), unchangeable to the user, and without affecting the end value.
this is my code:
const ProductPrice = () => {
const [info, setInfo] = useState({
discountPrice: '',
});
const handleChange = (e) => {
const value = e.target.value
setInfo({
...info,
[e.target.name]: value
})
}
return (
<div className='price-container'>
<input
name='discountPrice'
type='number'
placeholder=''
onChange={handleChange}
value={info.discountPrice}
/>
</div>
);
};
and this is a graphical example of how the final result should look: