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 know slots are not officially released, but thought i would share this finding incase you were not already aware. Are there plans to support this pattern?
However, the when using the below pattern slots throw an error
typeButtonProps={Icon: ComponentType<IconProps>;};exportconstButtonWithIconComponent=({
Icon,}: ButtonProps)=>{return(<button>
// our Icon is a component
// its name starts with a capital letter to signal that
// so we can just render it here as any other component
<Icon/></button>);};
The text was updated successfully, but these errors were encountered:
Currently Studio Experience components utilize props for all the component variables, and we don't currently have a variable type that would allow a prop to be a React or HTML Element. You could create a list of strings for a variable that are the names of different icons, and then in your Button component you could map the icon name variable to the related Icon component.
I'll raise your feedback to the team internally and see if would consider adding support for this pattern in the future. Thanks!
I know slots are not officially released, but thought i would share this finding incase you were not already aware. Are there plans to support this pattern?
The below works as expected:
However, the when using the below pattern slots throw an error
The text was updated successfully, but these errors were encountered: