const Alert = ({ children, className, type }) => {
  let typeClass = ''
  switch (type) {
    case 'info':
      typeClass = 'bg-blue-100 text-blue-900 border-blue-400'
      break
    case 'success':
      typeClass = 'bg-green-100 text-green-900 border-green-400'
      break
    case 'warning':
      typeClass = 'bg-yellow-100 text-yellow-900 border-yellow-400'
      break
  }
  return (
    <div className={`rounded-md w-full text-medium p-3 border ${typeClass} ${className}`}>
      {children}
    </div>
  )
}

export default Alert
