UNPKG

cluedin-widget

Version:

This is the project for creating and managing widgets in CluedIn.

20 lines (17 loc) 564 B
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>); } }