MCPcopy Create free account
hub / github.com/bytebase/bytebase / renderButton

Function renderButton

frontend/src/react/components/sql-editor/OpenAIButton.tsx:140–150  ·  view source on GitHub ↗
(onClick?: () => void)

Source from the content-addressed store, hash-verified

138 };
139
140 const renderButton = (onClick?: () => void) => (
141 <Button
142 variant={buttonVariant}
143 size={size}
144 className={buttonClass}
145 aria-label={t("plugin.ai.ai-assistant")}
146 onClick={onClick}
147 >
148 {icon}
149 </Button>
150 );
151
152 if (!hasActions) {
153 return renderButton(handleToggle);

Callers 1

OpenAIButtonFunction · 0.85

Calls 1

tFunction · 0.50

Tested by

no test coverage detected