{inputs.map((inputData) => {
let value = getValue(inputData.name, device, isHover);
let hasImportant = false;
if (withImportant) {
hasImportant = / !important$/.test(value);
if (hasImportant) {
value = value.replace(/ !important$/, '');
}
}
return (
{
newValue = newValue
? `${newValue}${
hasImportant
? ' !important'
: ''
}`
: undefined;
onChange(
inputData.name,
newValue,
device,
isHover
);
}}
expandOnFocus={expandOnFocus}
autoComplete="off"
/>
{withImportant && typeof value !== 'undefined' && (
{
if (value) {
const newValue = `${value}${
newWithImportant
? ' !important'
: ''
}`;
onChange(
inputData.name,
newValue,
device,
isHover
);
}
}}
isActive={hasImportant}
/>
)}
);
})}