Hello,
I am trying override Core:Button component, but when I am trying to pass some props such as buttonText, children or whatever. I dont see them as a props, which is causing some issue. If i register these as custom components without overide, they seems fine.
I am using NextJS, with GEN2 SDK. I would appreciate the help.
},
{
component: dynamic(() => import("../../components/Button/Button").then((mod) => mod.BuilderButton)),
name: "Core:Button",
...buttonConfig,
canHaveChildren: true,
},
Button.jsx
export const BuilderButton = ({ attributes, ...props }) => {
const { key, ...attributesWithoutKey } = attributes;
/// should see children as string i written in editor
console.log(props)
return <Button {...attributesWithoutKey} {...props} />;
};
“@builder.io/sdk-react”: “^3.0.7”,
this is the …aditionalConfig
override: true,
inputs: [
{
name: "children",
type: "string",
defaultValue: "Button",
friendlyName: "Text",
required: true,
},
]