Allowed MuttedMessage to define a margin 0

This commit is contained in:
Alejandro Celaya 2018-08-16 19:22:54 +02:00
parent f7f0d8c7c1
commit ec7b47fb32
2 changed files with 4 additions and 2 deletions

View file

@ -18,7 +18,7 @@ export class TagsList extends React.Component {
renderContent() {
const { tagsList, colorGenerator } = this.props;
if (tagsList.loading) {
return <MuttedMessage>Loading...</MuttedMessage>
return <MuttedMessage marginSize={0}>Loading...</MuttedMessage>
}
if (tagsList.error) {

View file

@ -3,7 +3,9 @@ import { Card } from 'reactstrap';
import classnames from 'classnames';
export default function MutedMessage({ children, marginSize = 4 }) {
const cardClasses = classnames('bg-light', `mt-${marginSize}`);
const cardClasses = classnames('bg-light', {
[`mt-${marginSize}`]: marginSize > 0,
});
return (
<div className="col-md-10 offset-md-1">