mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-01-11 02:37:22 +03:00
28 lines
688 B
JavaScript
28 lines
688 B
JavaScript
import React from 'react';
|
|
import { Card } from 'reactstrap';
|
|
import classnames from 'classnames';
|
|
import PropTypes from 'prop-types';
|
|
|
|
const DEFAULT_MARGIN_SIZE = 4;
|
|
const propTypes = {
|
|
marginSize: PropTypes.number,
|
|
children: PropTypes.node,
|
|
};
|
|
|
|
export default function MutedMessage({ children, marginSize = DEFAULT_MARGIN_SIZE }) {
|
|
const cardClasses = classnames('bg-light', {
|
|
[`mt-${marginSize}`]: marginSize > 0,
|
|
});
|
|
|
|
return (
|
|
<div className="col-md-10 offset-md-1">
|
|
<Card className={cardClasses} body>
|
|
<h3 className="text-center text-muted mb-0">
|
|
{children}
|
|
</h3>
|
|
</Card>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
MutedMessage.propTypes = propTypes;
|