@mui/material
Version:
Quickly build beautiful React apps. MUI is a simple and customizable component library to build faster, beautiful, and more accessible React applications. Follow your own design system, or start with Material Design.
16 lines (14 loc) • 387 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;
}, {});
}