import PropTypes from 'prop-types'
/**
* Primary UI component for user interaction
*/
export const TextInputIcon = ({ icon, position, placeholder }) => {
return (
{position === 'left' ?
{icon}
: null}
{position === 'right' ?
{icon}
: null}
)
}
TextInputIcon.propTypes = {
/**
* Icon to place in text input
*/
icon: PropTypes.element,
/**
* Side to place icon
*/
position: PropTypes.oneOf(['left', 'right']),
/**
* Input placeholder
*/
placeholder: PropTypes.string,
}