Adding styling

This commit is contained in:
Belén Curcio
2018-09-25 14:13:54 -03:00
parent 2f492c1f83
commit 45e942a345
6 changed files with 28 additions and 7 deletions
@@ -1,3 +1,4 @@
import cn from "classnames";
import dompurify from "dompurify";
import React, { StatelessComponent } from "react";
@@ -5,11 +6,15 @@ import styles from "./HTMLContent.css";
interface HTMLContentProps {
children: string;
className?: string;
}
const HTMLContent: StatelessComponent<HTMLContentProps> = ({ children }) => (
const HTMLContent: StatelessComponent<HTMLContentProps> = ({
children,
className,
}) => (
<div
className={styles.root}
className={cn(styles.root, className)}
dangerouslySetInnerHTML={{ __html: dompurify.sanitize(children) }}
/>
);