Replies: 1 comment
-
I just found out by myself, but I was wondering if there is a general approach regarding using custom and default components together import { Icons, SidePanelFactory } from "@kepler.gl/components";
function CustomSidePanelFactory(...args) {
const CustomSidePanel = SidePanelFactory(...args);
const CustomSidePanelWrapper = (props) => {
return (
<CustomSidePanel
{...props}
panels={[
{
id: "rocket",
label: "Rocket",
iconComponent: Icons.Rocket,
component: () => <div className="rocket-panel">Rocket</div>,
},
...CustomSidePanel.defaultPanels,
]}
/>
);
};
return CustomSidePanelWrapper;
}
CustomSidePanelFactory.deps = SidePanelFactory.deps;
export default CustomSidePanelFactory; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to customize the SidePanel and add an additional tab, besides the default ones (Layer, Filter, Interactions, Basemap).
I created a
CustomSidePanelFactory.js
And use it with
injectComponents
How can I have my Rocket panel together with the default panels?
Beta Was this translation helpful? Give feedback.
All reactions