adjustable settings

This commit is contained in:
Gavin McDonald
2025-04-16 15:20:06 -04:00
parent 3018cd7c10
commit 14dc1139fb
10 changed files with 158 additions and 63 deletions

View File

@@ -3,6 +3,8 @@
import { useState } from 'react';
import { Copy as CopyIcon } from 'lucide-react';
import ToolTip from '@/components/ToolTip';
type CopyButtonProps = {
title: string;
copy: string;
@@ -22,15 +24,16 @@ export default function CopyButton({ title, copy }: CopyButtonProps) {
};
return (
<button
onClick={handleCopy}
className="px-4 py-3 bg-gray-800 hover:bg-gray-700 text-white rounded-xl flex flex-col items-start gap-1 shadow transition-all cursor-pointer"
>
<div className="flex items-center gap-2 w-full text-sm font-medium">
{`${copied ? 'Copied' : 'Copy'} ${title}`}
<CopyIcon className="ml-auto" size={16} />
</div>
<div className="text-xs font-mono opacity-80 break-all">{copy}</div>
</button>
<ToolTip content={copy}>
<button
onClick={handleCopy}
className="w-full py-1 px-2 bg-gray-700 hover:bg-gray-600 text-white rounded-lg flex flex-col items-start gap-1 shadow transition-all cursor-pointer"
>
<div className="flex items-center gap-2 w-full text-sm font-medium">
{`${copied ? 'Copied' : 'Copy'} ${title}`}
<CopyIcon className="ml-auto" size={16} />
</div>
</button>
</ToolTip>
);
}