-
onCopyAsMarkdownClick({ setCopyingStatus })}
- >
- {copyingStatus === 'loading' && }
- {copyingStatus === 'copied' && }
- {copyingStatus === 'idle' && }
-
-
onCopyAsMarkdownClick({ setCopyingStatus })}
- className={styles.llmButtonText}
- >
- {getButtonText({ status: copyingStatus })}
-
-
-
+const MenuBase = React.forwardRef(
+ (
+ { children, copyingStatus, setCopyingStatus, chevronIconRef, ...props },
+ ref,
+ ) => (
+
+
+
onCopyAsMarkdownClick({ setCopyingStatus })}
+ >
+ {copyingStatus === 'loading' && }
+ {copyingStatus === 'copied' && }
+ {copyingStatus === 'idle' && }
+
+
onCopyAsMarkdownClick({ setCopyingStatus })}
+ className={styles.llmButtonText}
+ >
+ {getButtonText({ status: copyingStatus })}
+
+
+
+
-
+ ),
);
const Option = ({ Icon, label, description, showExternalIcon }) => (
@@ -278,14 +276,15 @@ export default function LLMButtons({ isApiReferencePage = false }) {
)
}
components={{
- MenuBase: (props) => (
+ MenuBase: React.forwardRef((props, ref) => (
- ),
+ )),
}}
onSelect={onMenuOptionClick}
options={DROPDOWN_OPTIONS}