You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
417 B
JavaScript
21 lines
417 B
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = formControlState;
|
|
function formControlState({
|
|
props,
|
|
states,
|
|
muiFormControl
|
|
}) {
|
|
return states.reduce((acc, state) => {
|
|
acc[state] = props[state];
|
|
if (muiFormControl) {
|
|
if (typeof props[state] === 'undefined') {
|
|
acc[state] = muiFormControl[state];
|
|
}
|
|
}
|
|
return acc;
|
|
}, {});
|
|
} |