UNPKG

381 BJavaScriptView Raw
1export default function formControlState(_ref) {
2 var props = _ref.props,
3 states = _ref.states,
4 muiFormControl = _ref.muiFormControl;
5 return states.reduce(function (acc, state) {
6 acc[state] = props[state];
7 if (muiFormControl) {
8 if (typeof props[state] === 'undefined') {
9 acc[state] = muiFormControl[state];
10 }
11 }
12 return acc;
13 }, {});
14}
\No newline at end of file