SPB Git

spb/groupe-ka Public

Groupe KA — site du holding + KA ID (compte unique & SSO des 7 plateformes). Next.js 16, SQLite, Google & Apple login.

TypeScript 93.9% CSS 6%
628 B · 30 lines tsx
Raw Blame History
1// Auteur : Simon-Pierre Boucher — contact@spboucher.ai2"use client";34import { useState } from "react";56export default function CopyText({7  text,8  label,9}: {10  text: string;11  label: string;12}) {13  const [copied, setCopied] = useState(false);14  return (15    <button16      type="button"17      className="btn btn-ghost !min-h-[36px] !px-3 !text-[12.5px]"18      onClick={async () => {19        try {20          await navigator.clipboard.writeText(text);21          setCopied(true);22          setTimeout(() => setCopied(false), 1800);23        } catch {}24      }}25    >26      {copied ? "✓ Copié" : label}27    </button>28  );29}30