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