Skip to content

How to properly close/skip the tour with the custom tooltip component's close button? #645

Closed Answered by jiyang-sas
jiyang-sas asked this question in Q&A
Discussion options

You must be logged in to vote

In the Close button's onPress handler, I just invoked the skipProps.onClick(), that seems solved the problem. Does that sounds a correct fix?
<Button
icon={{ icon: closeIcon, tooltip: 'Exit' }}
variant={ButtonVariant.PrimaryLight}
onPress={() => {
closeProps?.onClick(
(new MouseEvent('click') as unknown) as ReactMouseEvent
);
skipProps?.onClick(
(new MouseEvent('click') as unknown) as ReactMouseEvent
);
}}
/>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gilbarbara
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant