import React from 'react'
import styles from "./Input.module.css"
import { ErrorFormatter } from 'storybook/internal/components'
export const Input =({type='text',placeholder='',isInvalid=false,onChange,value='',errorMessage="",variant,...props}) => {
  return (
    <div >
      <input className={`${styles.inputbox} ${isInvalid && styles.invalid}`} type={type} placeholder={placeholder}  onChange={onChange} {...props}/>
      {errorMessage && <p className={styles.error} style={{
        color:'red'
      }}>{errorMessage}</p>}
    </div>
      
  )
}
