MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getCopyIconText

Function getCopyIconText

cli/src/components/copy-button.tsx:29–38  ·  view source on GitHub ↗
(
  isCopied: boolean,
  isHovered: boolean,
  leadingSpace: boolean,
)

Source from the content-addressed store, hash-verified

27 * Exported for testing.
28 */
29export const getCopyIconText = (
30 isCopied: boolean,
31 isHovered: boolean,
32 leadingSpace: boolean,
33): string => {
34 const space = leadingSpace ? ' ' : ''
35 if (isCopied) return `${space}${COPY_ICON_COPIED}`
36 if (isHovered) return `${space}${COPY_ICON_EXPANDED}`
37 return `${space}${COPY_ICON_COLLAPSED}`
38}
39
40/**
41 * State transition handlers for the copy button.

Callers 2

CopyIconFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected