coreenhancementhelp wanted
説明
export const createMitosisComponent = (
options?: Partial<MitosisComponent>,
): MitosisComponent => ({
'@type': '@builder.io/mitosis/component',
imports: [],
inputs: [],
meta: {},
state: {},
children: [],
hooks: {},
context: { get: {}, set: {} },
name: options?.name || 'MyComponent',
subComponents: [],
...options,
});
a component needs to have all named slots available and I think it should be added here. and inside of children we need Slot nodes
'@type': '@builder.io/mitosis/component',
slots: {
mySelectorName: createMitosisComponent({})
},
children: [
createMitosisNode({
name: 'Slot',
properties: {
name: 'mySelectorName'
}
});
],