2018-06-28 17:54:24 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Block
|
|
|
|
*/
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { FormattedMessage } from 'react-intl';
|
|
|
|
|
|
|
|
import styles from './styles.scss';
|
|
|
|
|
2018-07-16 12:29:57 +02:00
|
|
|
const Block = ({ children, description, style, title }) => (
|
2018-06-28 17:54:24 +02:00
|
|
|
<div className="col-md-12">
|
2018-07-16 12:29:57 +02:00
|
|
|
<div className={styles.ctmBlock} style={style}>
|
2018-06-28 17:54:24 +02:00
|
|
|
<div className={styles.ctmBlockTitle}>
|
|
|
|
<FormattedMessage id={title} />
|
|
|
|
<FormattedMessage id={description}>
|
|
|
|
{msg => <p>{msg}</p>}
|
|
|
|
</FormattedMessage>
|
|
|
|
</div>
|
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
Block.defaultProps = {
|
|
|
|
children: null,
|
|
|
|
description: 'app.utils.defaultMessage',
|
2018-07-16 12:29:57 +02:00
|
|
|
style: {},
|
2018-06-28 17:54:24 +02:00
|
|
|
title: 'app.utils.defaultMessage',
|
|
|
|
};
|
|
|
|
|
|
|
|
Block.propTypes = {
|
|
|
|
children: PropTypes.any,
|
|
|
|
description: PropTypes.string,
|
2018-07-16 12:29:57 +02:00
|
|
|
style: PropTypes.object,
|
2018-06-28 17:54:24 +02:00
|
|
|
title: PropTypes.string,
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Block;
|