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