Overriding built-in components duplicating it

Hello @saura,

For overriding the Box component, try using the below code

const FakeBox = () => <div>Boxxx!!</div>;
Builder.registerComponent(FakeBox, {
  name: "Core:Box",
  override: true,
  canHaveChildren: true,
  inputs: [
    {
      name: 'children',
      type: 'uiBlocks',
      defaultValue: [],
      // showNoBlocks: false
      hideFromUI: true,
    },
    {
      name: 'verticalAlignContent',
      type: 'string',
      enum: ['top', 'bottom', 'middle'],
      defaultValue: 'top',
    },
  ],
  defaultStyles: {
    height: '100px',
  },
});

To hide the insertMenu, you can use the below code

Builder.register('editor.settings', { customInsertMenu: true });
1 Like