import React from 'react'

import { InformationCircleIcon } from '@heroicons/react/solid'
import '../tailwind.css'

export interface AlertProps {
  /* Message explaining how to resolve the error */
  message: string
}
// TODO(ocordova): Create icon component and import heroicons

export const Alert = ({ message, ...any }: AlertProps) => {
  return (
    <div className="rounded-lg bg-inverted-soft-background p-4" {...any}>
      <div className="flex">
        <div className="flex-shrink-0">
          <InformationCircleIcon
            className="h-5 w-5 text-inverted-text"
            aria-hidden="true"
          />
        </div>
        <div className="ml-3 flex-1 md:flex md:justify-between">
          <p className="text-sm text-inverted-text">{message}</p>
        </div>
      </div>
    </div>
  )
}
