Convert ClipboardButton to TypeScript

(cherry picked from commit 99fc52039f44264c83d939e5f096d8e16d2f3355)
This commit is contained in:
Treycos
2024-09-21 19:09:55 +02:00
committed by Bogdan
parent 24063e06ab
commit 94cf07ddb4
5 changed files with 73 additions and 173 deletions

View File

@@ -1,7 +1,9 @@
let i = 0;
// returns a HTML 4.0 compliant element IDs (http://stackoverflow.com/a/79022)
/**
* @deprecated Use React's useId() instead
* @returns An HTML 4.0 compliant element IDs (http://stackoverflow.com/a/79022)
*/
export default function getUniqueElementId() {
return `id-${i++}`;
}