import React, { Component, PropTypes } from "react"; export default class DismissibleAlert extends Component { render () { let alertType = "alert-danger"; if (this.props.type) { alertType = "alert-" + this.props.type; } return (

{this.props.text}

); } } DismissibleAlert.propTypes = { type: PropTypes.string, text: PropTypes.string };