diff options
| author | Kamran Ahmed <kamranahmed.se@gmail.com> | 2018-08-28 15:47:02 +0500 |
|---|---|---|
| committer | Kamran Ahmed <kamranahmed.se@gmail.com> | 2018-08-28 15:47:02 +0500 |
| commit | f441166a3bf27c145a48ae2350cd8cd0931504e9 (patch) | |
| tree | cad4e80d88d6910cda192ec3f1f0d4d80f71f331 /src/components | |
| parent | Alert for token (diff) | |
| download | githunt-f441166a3bf27c145a48ae2350cd8cd0931504e9.tar.gz | |
Refactor and add error handling
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/alert/index.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/components/alert/index.js b/src/components/alert/index.js new file mode 100644 index 0000000..7d04355 --- /dev/null +++ b/src/components/alert/index.js @@ -0,0 +1,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; |
