mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-04-20 05:19:28 +01:00
Filtering DBs and option for pin(fav)(#2301)
* implemented search bar * formatting corrected * added pin(fav) and sorting in local in sidebar tree of DE * reverted changes * fixed lint and formatting issues * fixed lint and formatting issues * theme toggle button is disabled if in portal * fixed lint error * added link on disabled theme toggle button * updated the variable for pin icon * removed en-us from url --------- Co-authored-by: nishthaAhujaa <nishtha17354@iiittd.ac.in> Co-authored-by: sakshigupta12feb <sakshigupta12feb1@gmail.com> Co-authored-by: Sakshi Gupta <sakshig@microsoft.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
IconType,
|
||||
IDropdownOption,
|
||||
IDropdownStyles,
|
||||
TooltipHost,
|
||||
} from "@fluentui/react";
|
||||
import { useQueryCopilot } from "hooks/useQueryCopilot";
|
||||
import { KeyboardHandlerMap } from "KeyboardShortcuts";
|
||||
@@ -154,6 +155,21 @@ export const convertButton = (btns: CommandButtonComponentProps[], backgroundCol
|
||||
id: btn.id,
|
||||
};
|
||||
|
||||
if (btn.tooltipContent) {
|
||||
result.title = undefined;
|
||||
result.commandBarButtonAs = (props: IComponentAsProps<ICommandBarItemProps>) => {
|
||||
const { defaultRender: DefaultRender, ...rest } = props;
|
||||
return React.createElement(
|
||||
TooltipHost,
|
||||
{
|
||||
content: btn.tooltipContent as JSX.Element,
|
||||
calloutProps: { gapSpace: 0 },
|
||||
},
|
||||
React.createElement(DefaultRender, rest),
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
if (isSplit) {
|
||||
// It's a split button
|
||||
result.split = true;
|
||||
|
||||
Reference in New Issue
Block a user