mirror of
https://github.com/zhigang1992/docz.git
synced 2026-03-30 08:54:41 +08:00
* fix(docz-core): reduce from plugins arguments * feat(docz-plugin-css): add initial version of plugin * chore(docz-plugin-css): add some examples
24 lines
418 B
JavaScript
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',
|
|
}
|