Skip to content

Button component in content prop #165

Open
@ziabskiK

Description

@ziabskiK

How is it possible to trigger onClick function on button which is located as a content of swipe element?

Any tip how to achieve this?

Thanks in advance.
Edit Code:
{({ className, ...rest }) => (

<SwipeableListItem key={id}
swipeLeft={{
content: <Button startIcon={} className={classes.addToCartBtn}
onClick={e => {
e.stopPropagation();
console.log('Test function call');
}}>
Add to cart
,
actionAnimation: ActionAnimations.NONE
}}
{...rest}>
///items

))}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions