F1Manager-Calc/components/Kofi/Kofi.js
2023-04-21 14:23:20 +08:00

15 lines
379 B
JavaScript

import React, { useRef } from "react";
import kofiWidget2 from "./widget";
const KofiButton = ({ title, color, kofiID }) => {
const { current: KofiWidget2 } = useRef(kofiWidget2());
KofiWidget2.init(title, color, kofiID);
return React.createElement(
"div",
{ dangerouslySetInnerHTML: { __html: KofiWidget2.getHTML() } }
);
};
export { KofiButton as default };