mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-21 18:01:39 +00:00
Migrate SidePanel state to Zustand (#799)
Co-authored-by: hardiknai-techm <HN00734461@TechMahindra.com>
This commit is contained in:
@@ -1,25 +1,26 @@
|
||||
import React, { FunctionComponent } from "react";
|
||||
import * as ViewModels from "../../../Contracts/ViewModels";
|
||||
import { useSidePanel } from "../../../hooks/useSidePanel";
|
||||
import { GraphStyleComponent } from "../../Graph/GraphStyleComponent/GraphStyleComponent";
|
||||
import { IGraphConfig } from "../../Tabs/GraphTab";
|
||||
import { PanelFooterComponent } from "../PanelFooterComponent";
|
||||
interface GraphStylingProps {
|
||||
closePanel: () => void;
|
||||
igraphConfigUiData: ViewModels.IGraphConfigUiData;
|
||||
igraphConfig: IGraphConfig;
|
||||
getValues: (igraphConfig?: IGraphConfig) => void;
|
||||
}
|
||||
|
||||
export const GraphStylingPanel: FunctionComponent<GraphStylingProps> = ({
|
||||
closePanel,
|
||||
igraphConfigUiData,
|
||||
igraphConfig,
|
||||
getValues,
|
||||
}: GraphStylingProps): JSX.Element => {
|
||||
const closeSidePanel = useSidePanel((state) => state.closeSidePanel);
|
||||
|
||||
const buttonLabel = "Ok";
|
||||
|
||||
const submit = () => {
|
||||
closePanel();
|
||||
closeSidePanel();
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user