mirror of
https://github.com/getredash/redash.git
synced 2026-03-21 16:00:09 -04:00
* Prettier all the JS files * Add GitHub Action to autoformat code pushed to master * Fix eslint violation due to formatting. * Remove GitHub actions for styling * Add restyled.io config
21 lines
432 B
JavaScript
21 lines
432 B
JavaScript
import React from "react";
|
|
import PropTypes from "prop-types";
|
|
import { $sanitize } from "@/services/ng";
|
|
|
|
export default function HtmlContent({ children, ...props }) {
|
|
return (
|
|
<div
|
|
{...props}
|
|
dangerouslySetInnerHTML={{ __html: $sanitize(children) }} // eslint-disable-line react/no-danger
|
|
/>
|
|
);
|
|
}
|
|
|
|
HtmlContent.propTypes = {
|
|
children: PropTypes.string,
|
|
};
|
|
|
|
HtmlContent.defaultProps = {
|
|
children: "",
|
|
};
|