Migrated Home component to a functional component

This commit is contained in:
Alejandro Celaya
2020-03-08 11:35:06 +01:00
parent 99042c0979
commit febecab33c
5 changed files with 779 additions and 135 deletions

View File

@@ -7,14 +7,14 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
const getClassForType = (type) => {
const map = {
error: 'bg-danger',
error: 'border-danger',
};
return map[type] || 'bg-light';
return map[type] || '';
};
const getTextClassForType = (type) => {
const map = {
error: 'text-white',
error: 'text-danger',
};
return map[type] || 'text-muted';
@@ -28,7 +28,7 @@ const propTypes = {
};
const Message = ({ children, loading = false, noMargin = false, type = 'default' }) => {
const cardClasses = classNames(getClassForType(type), { 'mt-4': !noMargin });
const cardClasses = classNames('bg-light', getClassForType(type), { 'mt-4': !noMargin });
return (
<div className="col-md-10 offset-md-1">