ToolJet/frontend/src/Editor/Components/SvgImage.jsx
Kiran Ashok 58893c5139
[ Feature ] :: svg widget (#2806)
* svg icon

* svg component

* cleanup

* name updated

* name updated

* fixing overflow issue

* dafault image
2022-04-18 19:08:50 +05:30

12 lines
406 B
JavaScript

import React from 'react';
import DOMPurify from 'dompurify';
export const SvgImage = function Timeline({ properties, styles, height }) {
const { visibility } = styles;
const { data } = properties;
return (
<div style={{ display: visibility ? '' : 'none', overflow: 'hidden', height: height }}>
<div dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(data) }}></div>
</div>
);
};