mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-21 18:01:39 +00:00
Migrate graph style panel to react (#619)
Co-authored-by: Steve Faulkner <southpolesteve@gmail.com>
This commit is contained in:
37
src/Explorer/Panes/GraphStylingPanel/GraphStylingPanel.tsx
Normal file
37
src/Explorer/Panes/GraphStylingPanel/GraphStylingPanel.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
import React, { FunctionComponent } from "react";
|
||||
import * as ViewModels from "../../../Contracts/ViewModels";
|
||||
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 buttonLabel = "Ok";
|
||||
|
||||
const submit = () => {
|
||||
closePanel();
|
||||
};
|
||||
|
||||
return (
|
||||
<form className="panelFormWrapper" onSubmit={submit}>
|
||||
<div className="panelMainContent">
|
||||
<GraphStyleComponent
|
||||
igraphConfigUiData={igraphConfigUiData}
|
||||
igraphConfig={igraphConfig}
|
||||
getValues={getValues}
|
||||
></GraphStyleComponent>
|
||||
</div>
|
||||
<PanelFooterComponent buttonLabel={buttonLabel} />
|
||||
</form>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user