summaryrefslogtreecommitdiff
path: root/src/components/Alert.js
blob: 68fb84b163b2b1e1388e006da42c2b9befa0d932 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const Alert = ({ children, className, type }) => {
  let typeClass = '';
  switch (type) {
    case 'info':
      typeClass = ' bg-blue-100 text-blue-900 '
      break;
    case 'success':
      typeClass = ' bg-green-100 text-green-900 '
      break;
  }
  return (
    <div className={"rounded w-full text-medium p-3" + typeClass + className}>{children}</div>
  );
}

export default Alert;