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

Function getButtonColors

cli/src/components/tools/render-ui.tsx:34–50  ·  view source on GitHub ↗
(
  theme: ReturnType<typeof useTheme>,
  variant: RenderUIButtonVariant,
  isHovered: boolean,
)

Source from the content-addressed store, hash-verified

32}
33
34const getButtonColors = (
35 theme: ReturnType<typeof useTheme>,
36 variant: RenderUIButtonVariant,
37 isHovered: boolean,
38) => {
39 if (variant === 'secondary') {
40 return {
41 backgroundColor: isHovered ? theme.surfaceHover : theme.surface,
42 foregroundColor: theme.foreground,
43 }
44 }
45
46 return {
47 backgroundColor: theme.primary,
48 foregroundColor: theme.name === 'dark' ? '#111827' : '#ffffff',
49 }
50}
51
52const CLICK_FLASH_DURATION_MS = 150
53

Callers 1

RenderUIButtonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected