Port context menus.

This commit is contained in:
Paul
2021-06-19 20:24:11 +01:00
parent 0a0c00fe58
commit b4bc2262ae
10 changed files with 841 additions and 18 deletions

View File

@@ -2,8 +2,8 @@ import { useState } from "preact/hooks";
const counts: { [key: string]: number } = {};
export default function PaintCounter({ small }: { small?: boolean }) {
if (import.meta.env.PROD) return null;
export default function PaintCounter({ small, always }: { small?: boolean, always?: boolean }) {
if (import.meta.env.PROD && !always) return null;
const [uniqueId] = useState('' + Math.random());
const count = counts[uniqueId] ?? 0;