1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-06-05 20:15:31 -04:00

minor style tweaks

This commit is contained in:
2025-05-05 12:55:12 -04:00
parent 5058382f71
commit 27e6ca2a4b
64 changed files with 571 additions and 551 deletions
+12 -6
View File
@@ -5,12 +5,18 @@ import copy from "copy-to-clipboard";
import { ClipboardIcon, CheckIcon } from "lucide-react";
import type { Ref, ComponentPropsWithoutRef, ComponentRef, MouseEventHandler } from "react";
export type CopyButtonProps = ComponentPropsWithoutRef<"button"> & {
source: string;
timeout?: number;
};
const CopyButton = ({ source, timeout = 2000, style, ...rest }: CopyButtonProps, ref: Ref<ComponentRef<"button">>) => {
const CopyButton = (
{
source,
timeout = 2000,
style,
...rest
}: ComponentPropsWithoutRef<"button"> & {
source: string;
timeout?: number;
},
ref: Ref<ComponentRef<"button">>
) => {
const [copied, setCopied] = useState(false);
const handleCopy: MouseEventHandler<ComponentRef<"button">> = (e) => {