Hi again, we’re currently trying to nest an interactive Button component inside of a Card component and we followed https://docs.plasmic.app/learn/nested-slots/ to turn the Button into a slot. But we’re running into issues with hooking up the button functionality in code while still maintaining button styles from Plasmic. Is there a preferred way to do this?
Are you doing something like the following, and it’s not working as expected?
<PlasmicComponent
component="Card"
componentProps={{
myNamedButton: {
onClick: () => alert()
}
}}
/>
Ok we originally went this route of having button as a named component. When we converted the button over to a slot, we weren’t able to override props anymore. @frantic_duck You mentioned you ran into a problem with the named approach?
Yeah, you cannot pass props to a component’s default slot contents, since they are just placeholders that are typically completely replaced at the component instances
Makes sense