UNPKG

489 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = formControlState;
7
8function formControlState(_ref) {
9 var props = _ref.props,
10 states = _ref.states,
11 muiFormControl = _ref.muiFormControl;
12 return states.reduce(function (acc, state) {
13 acc[state] = props[state];
14
15 if (muiFormControl) {
16 if (typeof props[state] === 'undefined') {
17 acc[state] = muiFormControl[state];
18 }
19 }
20
21 return acc;
22 }, {});
23}
\No newline at end of file