F1Manager-Calc/components/Kofi/Kofi.js

15 lines
379 B
JavaScript
Raw Normal View History

2023-04-21 08:23:20 +02:00
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 };