sportstg-bluekit
Version:

37 lines (30 loc) • 660 B
JavaScript
import React from 'react'
import PropTypes from 'prop-types'
import styles from './InputBox.scss'
const InputBox = ({
labelText,
inputValue,
showIcon,
icon,
}) => {
return (
<div className={styles.inputBox}>
<label>{labelText}</label>
<input type="text" value={inputValue} />
{(showIcon) && icon}
</div>
);
}
InputBox.propTypes = {
inputValue: PropTypes.string,
labelText: PropTypes.string,
showIcon: PropTypes.bool,
icon: PropTypes.oneOf(['arrow', 'lock', 'find']),
};
InputBox.defaultProps = {
inputValue: null,
labelText: 'Default Text',
showIcon: false,
icon: 'arrow',
};
export default InputBox