UNPKG

@s-ui/react-molecule-input-field

Version:

`MoleculeInputField` is a component that wraps a composition of Label + Textarea + Validation Messages.

15 lines 540 B
import { inputStates } from '@s-ui/react-atom-input'; export var getErrorState = function getErrorState(_ref) { var successText = _ref.successText, errorText = _ref.errorText; if (successText) return false; if (errorText) return true; }; export var getState = function getState(_ref2) { var successText = _ref2.successText, errorState = _ref2.errorState, alertText = _ref2.alertText; if (successText) return inputStates.SUCCESS; if (errorState) return inputStates.ERROR; if (alertText) return inputStates.ALERT; };