mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
19 lines
333 B
TypeScript
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);
|