import { Typography } from "antd";
import { type TCodeConvertor, XmlToReact } from "./utilities"
import { gfwClear } from "../../gfwlist";
const { Text } = Typography;
interface IWidget {
html?: string | null;
className?: string;
placeholder?: string;
wordWidget?: boolean;
convertor?: TCodeConvertor;
style?: React.CSSProperties;
}
const MdViewWidget = ({
html,
className,
wordWidget = false,
placeholder,
convertor,
style,
}: IWidget) => {
if (html && html.trim() !== "") {
return (
{XmlToReact(gfwClear(html), wordWidget, convertor)}
);
} else {
return {placeholder};
}
};
export default MdViewWidget;