Unable to register the Antd Steps component

Hi Team,

I am trying to register antD Steps component. We need to use Steps.Step, and there is no default or named export for Step component.

If we register Step as mentioned in below code, it works on Plasmic Studio as expected but doesn’t work in auto generated code.

registerComponent(Steps.Step, {
  name: "Step",
  props: {
    description: "slot",
    title: "slot"
  },
  importPath: "antd"
})

I am getting below error while using auto generated code:

Uncaught SyntaxError: The requested module ‘/node_modules/.vite/antd.js?v=e57dbb3b’ does not provide an export named ‘Step’

The same propblem exists for all such components like Mentions.option

Can you please help with this scenario.

Thank you.

Hi Vandana! Indeed the registration of such sub-components can be improved.

For now, one way to make it work is to find the exact module from which that component is exported. For example:

Step is a named export of "rc-steps"
Option is the default export of "rc-mentions/lib/Option"
MenuItem is the default export of antd/lib/menu/MenuItem

Thank you, importing Step from "rc-steps" is working.