summaryrefslogtreecommitdiff
path: root/src/components/alert/index.js
blob: 7d043557ffa8c64b56d528cbe3f0930e8974bd88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';

const Alert = (props) => (
  <div className={ classnames('alert', `alert-${props.type}`) }>{ props.children }</div>
);

Alert.propTypes = {
  type: PropTypes.string.isRequired
};

export default Alert;