UNPKG

@material-ui/core

Version:

React components that implement Google's Material Design.

23 lines (19 loc) 489 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = formControlState; function formControlState(_ref) { var props = _ref.props, states = _ref.states, muiFormControl = _ref.muiFormControl; return states.reduce(function (acc, state) { acc[state] = props[state]; if (muiFormControl) { if (typeof props[state] === 'undefined') { acc[state] = muiFormControl[state]; } } return acc; }, {}); }