19 lines
504 B
TypeScript
19 lines
504 B
TypeScript
import { Controller } from "@hotwired/stimulus"
|
|
|
|
interface KofiWidgetOverlay {
|
|
draw: (pid: string, config: object) => void;
|
|
}
|
|
|
|
declare const kofiWidgetOverlay: KofiWidgetOverlay;
|
|
|
|
export default class extends Controller {
|
|
override connect() {
|
|
kofiWidgetOverlay.draw("maidboye", {
|
|
"type": "floating-chat",
|
|
"floating-chat.donateButton.text": "Donate",
|
|
"floating-chat.donateButton.background-color": "#00bfa5",
|
|
"floating-chat.donateButton.text-color": "#fff"
|
|
});
|
|
}
|
|
}
|