FrontPastel/node_modules/@mui/material/legacy/FormControl/formControlState.js

14 lines
381 B
JavaScript

export default function formControlState(_ref) {
var props = _ref.props,
states = _ref.states,
muiFormControl = _ref.muiFormControl;
return states.reduce(function (acc, state) {
acc[state] = props[state];
if (muiFormControl) {
if (typeof props[state] === 'undefined') {
acc[state] = muiFormControl[state];
}
}
return acc;
}, {});
}