import React from 'react'; import PropTypes from 'prop-types'; import cn from 'classnames'; import styles from './InputField.css'; import ErrorMessage from './ErrorMessage'; import { Icon } from 'plugin-api/beta/client/components/ui'; const InputField = ({ id = '', label = '', type = 'text', name = '', onChange = () => {}, showError = true, hasError = false, errorMsg = '', children, columnDisplay = false, showSuccess = false, validationType = '', icon = '', value = '', defaultValue = '', disabled = false, }) => { const inputValue = { ...(value ? { value } : {}), ...(defaultValue ? { defaultValue } : {}), }; return (