summaryrefslogtreecommitdiffstats
path: root/webapp/components/integrations/components/integration_option.jsx
blob: 49474d939c230f25abbe0c090372419551ba1453 (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 {Link} from 'react-router/es6';

export default class IntegrationOption extends React.Component {
    static get propTypes() {
        return {
            image: React.PropTypes.string.isRequired,
            title: React.PropTypes.node.isRequired,
            description: React.PropTypes.node.isRequired,
            link: React.PropTypes.string.isRequired
        };
    }

    render() {
        const {image, title, description, link} = this.props;

        return (
            <Link
                to={link}
                className='integration-option'
            >
                <img
                    className='integration-option__image'
                    src={image}
                />
                <div className='integration-option__title'>
                    {title}
                </div>
                <div className='integration-option__description'>
                    {description}
                </div>
            </Link>
        );
    }
}