You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found name, displayName and resolver-key(important).
Document is heare(https://craft.js.org/docs/api/user-component).
It seems like the updates are not keeping up.
However, the type definitions(UserComponent) of code-base does not betray.
This is simple code.
import{Editor,Element,Frame,UserComponent,useNode}from"@craftjs/core"constMyUserComponent: UserComponent=()=>{const{ node }=useNode((node)=>({ node }))return(<div><div>Name: {node.data.name}</div><div>DisplayName: {node.data.displayName}</div></div>)}// Code completion works for both!MyUserComponent.craft={name: "RealName",displayName: "DisplayName"}exportdefaultfunctionMyEditor(){return(<Editorresolver={{RealName: MyUserComponent}}><Frame><Elementis={MyUserComponent}/></Frame></Editor>)}
Describe the bug
User Component name doesn't reflect what is specified in the UserComponentConfig.
To Reproduce
Expected behavior
The component shows
MyUserComponent
but I expectCustomName
Your environment
The text was updated successfully, but these errors were encountered: