summaryrefslogtreecommitdiffstats
path: root/webapp/components/admin_console/banner.jsx
blob: 6395ef4a1c1da20e22b770a108ef871de6ac8935 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

import React from 'react';
import PropTypes from 'prop-types';
import {FormattedMessage} from 'react-intl';

export default function Banner(props) {
    let title = (
        <FormattedMessage
            id='admin.banner.heading'
            defaultMessage='Note:'
        />
    );

    if (props.title) {
        title = props.title;
    }

    return (
        <div className='banner'>
            <div className='banner__content'>
                <h4 className='banner__heading'>
                    {title}
                </h4>
                <p>
                    {props.description}
                </p>
            </div>
        </div>
    );
}

Banner.defaultProps = {
};
Banner.propTypes = {
    title: PropTypes.node,
    description: PropTypes.node.isRequired
};