UNPKG

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