|
|
@@ -1,21 +1,23 @@
|
|
|
import { Typography } from "antd";
|
|
|
import { TCodeConvertor, XmlToReact } from "./utilities";
|
|
|
-const { Text } = Typography;
|
|
|
+const { Paragraph } = Typography;
|
|
|
|
|
|
interface IWidget {
|
|
|
html?: string;
|
|
|
+ className?: string;
|
|
|
placeholder?: string;
|
|
|
wordWidget?: boolean;
|
|
|
convertor?: TCodeConvertor;
|
|
|
}
|
|
|
const Widget = ({
|
|
|
html,
|
|
|
+ className,
|
|
|
wordWidget = false,
|
|
|
placeholder,
|
|
|
convertor,
|
|
|
}: IWidget) => {
|
|
|
const jsx = html ? XmlToReact(html, wordWidget, convertor) : placeholder;
|
|
|
- return <Text>{jsx}</Text>;
|
|
|
+ return <Paragraph className={className}>{jsx}</Paragraph>;
|
|
|
};
|
|
|
|
|
|
export default Widget;
|