import React from "react";

function Message(props) {
  if (!props.text) {
    return null;
  }

  return (
    <div className={"mb-4 rounded-md border p-3 text-sm " + (props.type === "error" ? "border-blue-900 bg-slate-100" : "border-blue-800 bg-slate-100")}>
      {props.text}
    </div>
  );
}

export default Message;
