Files
docz/examples/css-postcss/src/components/Alert.jsx
Pedro Nauck 299372ebca feat(docz-plugin-css): add initial version (#78)
* fix(docz-core): reduce from plugins arguments
* feat(docz-plugin-css): add initial version of plugin
* chore(docz-plugin-css): add some examples
2018-06-21 19:37:50 -03:00

24 lines
418 B
JavaScript

import React, { Fragment } from 'react'
import cx from 'classnames'
import t from 'prop-types'
import styles from './Alert.module.css'
export const Alert = ({ children, kind }) => (
<div
className={cx(styles.alert, {
[styles[kind]]: true,
})}
>
{children}
</div>
)
Alert.propTypes = {
kind: t.oneOf(['info', 'positive', 'negative', 'warning']),
}
Alert.defaultProps = {
kind: 'info',
}