Skip to content

Conversation

@matthewliuswims
Copy link

The previous e.g. for showing/hiding tooltip manually was good, but I thought could be improved, as for e.g. I was not sure what {open} was in open={open}

Also, I only realized setIsOpen() in previous e.g. worked because we were assuming a controlled component.

So my pr does the following:

  1. explicitly show that when using the prop open, we probably need a controlled component with
state = {
  open: false,
}
  1. demonstrate the ability to have a tooltip with a click trigger, which can then linger for a set amount of time (making this e.g. more practical and robust)
    setTimeout(() => alert('can do things after delay'), 2000);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant