Can you replace Sidebar or integrate custom Sidebar component?

Hi folks!

Is it possible to replace Sidebar or integrate custom Sidebar component there? I haven’t found an example and in docs only specific types set mentioned.

Hi @foreign_stoat

Yes, we are still working on docs for this, coming soon, but you can specify type:"custom", component: MyComponent

Thanks!

@yang Maybe you know why I have next issue after adding the customProps field.

I have next customProps and Comp:

const Comp = () => <div>Some Container</div>

customProps: {
      type: "custom",
      component: Comp,
    },

with next error:

Type error while registering code components
Failed to register code component named "Container". Custom control prop customProps has invalid "control" attr. `PropType.control` expects a React component to render the custom control, but received: undefined

Does it mean that I have to register Comp component as well?

If there is an example in any branch or PR I would appreciate it a lot :slightly_smiling_face:

I have to change component prop to control and it starts working

Sorry for the typo, you got it!