nocobase/.dumi/theme/builtins/Alert.tsx
chenos d5d0e1036b
docs: add docs (#75)
* docs: add docs

* ignore dumi theme test

* fix: error TS2717: Subsequent property declarations must have the same type.

* update docs

* deploy gh-pages

* plugins docs

* hash & cname

* exportStatic

* ssr

* vercel

* vercel

* fix: deploy vercel

* Delete vercel.json

* docs

* fix APP_DIST

* on master branch
2021-04-17 21:33:21 +08:00

18 lines
522 B
TypeScript
Executable File

import React from 'react';
import './Alert.less';
import { Alert } from 'antd';
import micromark from 'micromark'
export default (props: any) => {
const { title, children, ...others } = props;
console.log({children});
return (
<div className="__dumi-default-alert" {...others}>
{title && (
<p className={'__dumi-default-alert-title'}>{title}</p>
)}
{typeof children === 'string' ? <div dangerouslySetInnerHTML={{__html: micromark(`\n ${children} \n`)}}/> : children}
</div>
)
};