DefinitelyTyped/types/rehype-react/rehype-react-tests.tsx
2019-04-10 13:17:46 +02:00

19 lines
333 B
TypeScript

import React from "react";
import RehypeReact from "rehype-react";
const htmlAst = {
type: "element",
tagName: "button"
};
const { Compiler: compile } = new RehypeReact({
createElement: React.createElement,
components: {
button: () => {
return <button />;
}
}
});
compile(htmlAst);