mirror of
https://github.com/simstudioai/sim.git
synced 2026-10-24 23:06:59 +08:00
* improvement(landing, blog): SEO and GEO optimization * improvement(docs): ui/ux cleanup * chore(blog): remove unused buildBlogJsonLd export and wordCount schema field * fix(blog): stack related posts vertically on mobile and fill all suggestion slots - Add flex-col sm:flex-row and matching border classes to related posts nav for consistent mobile stacking with the main blog page - Remove score > 0 filter in getRelatedPosts so it falls back to recent posts when there aren't enough tag matches - Align description text color with main page cards
29 lines
943 B
TypeScript
29 lines
943 B
TypeScript
'use client'
|
|
|
|
import { useCopyButton } from 'fumadocs-ui/utils/use-copy-button'
|
|
import { Check, Copy } from 'lucide-react'
|
|
|
|
export function LLMCopyButton({ content }: { content: string }) {
|
|
const [checked, onClick] = useCopyButton(() => navigator.clipboard.writeText(content))
|
|
|
|
return (
|
|
<button
|
|
onClick={onClick}
|
|
className='flex cursor-pointer items-center gap-1.5 rounded-[5px] border border-transparent px-2.5 py-2 text-[13px] text-foreground/40 leading-none transition-colors duration-200 hover:border-border/40 hover:bg-neutral-100 hover:text-foreground/70 dark:hover:bg-neutral-800'
|
|
aria-label={checked ? 'Copied to clipboard' : 'Copy page content'}
|
|
>
|
|
{checked ? (
|
|
<>
|
|
<Check className='h-3.5 w-3.5' />
|
|
<span>Copied</span>
|
|
</>
|
|
) : (
|
|
<>
|
|
<Copy className='h-3.5 w-3.5' />
|
|
<span>Copy page</span>
|
|
</>
|
|
)}
|
|
</button>
|
|
)
|
|
}
|