summaryrefslogtreecommitdiffstats
path: root/webapp/components/admin_console/banner.jsx
blob: 2071fff930136013a561e1c512bbadbfee0cb743 (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
40
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

import React from 'react';
import {FormattedMessage} from 'react-intl';

export default class Banner extends React.Component {
    render() {
        let title = (
            <FormattedMessage
                id='admin.banner.heading'
                defaultMessage='Note:'
            />
        );

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

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

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