mirror of
https://github.com/strapi/strapi.git
synced 2025-09-03 22:03:08 +00:00
41 lines
854 B
JavaScript
41 lines
854 B
JavaScript
/**
|
|
*
|
|
* Block
|
|
*/
|
|
|
|
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import { FormattedMessage } from 'react-intl';
|
|
|
|
import styles from './styles.scss';
|
|
|
|
const Block = ({ children, description, style, title }) => (
|
|
<div className="col-md-12">
|
|
<div className={styles.ctmBlock} style={style}>
|
|
<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',
|
|
style: {},
|
|
title: 'app.utils.defaultMessage',
|
|
};
|
|
|
|
Block.propTypes = {
|
|
children: PropTypes.any,
|
|
description: PropTypes.string,
|
|
style: PropTypes.object,
|
|
title: PropTypes.string,
|
|
};
|
|
|
|
export default Block; |