import React, { Component } from 'react';

export default class Alert extends Component {
    render() {
        const { type } = this.props;
        let alertClassName = "cluedIn_alert ";

        if ( type === "danger" ) {
            alertClassName += "cluedIn_alert_danger";
        } else if ( type === "warning" ) {
            alertClassName += "cluedIn_alert_warning";
        } else {
            alertClassName += "cluedIn_alert_info";
        }

        return (<div className={alertClassName}>
            {this.props.children}
        </div>);
    }
}