Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 (WIP) #46

Merged
merged 16 commits into from Feb 9, 2019
Merged

V2 (WIP) #46

merged 16 commits into from Feb 9, 2019

Conversation

atomiks
Copy link
Owner

@atomiks atomiks commented Feb 7, 2019

Upgrading to tippy.js@4 once it's released

Highlights:

  • Using Hooks, smaller bundle
  • No more findDOMNode(), now using cloneElement with a ref. Ok, I don't know why I didn't see this being viable before, or anyone else pointing it out 馃槅. To wrap components, you'll need to use forwardRef(). Since styled-components@4 uses this already it's pretty seamless for most use cases.
  • No need to specify trigger="manual", it's added for you if isVisible is specified as a prop

Additional export(s):

  • tippy.group() wrapper
import { TippyGroup } from '@tippy.js/react'

// Usage:
<TippyGroup delay={1000}>
  <Tippy content="a">
    <button />
  </Tippy>
  <Tippy content="b">
    <button />
  </Tippy>
</TippyGroup>

@atomiks
Copy link
Owner Author

atomiks commented Feb 7, 2019

@KubaJastrz, the types need some updating, are you able to edit them with the correct ones

@KubaJastrz
Copy link
Contributor

KubaJastrz commented Feb 7, 2019

Sure, I'll check it out

Edit - there: #47

Copy link
Contributor

@KubaJastrz KubaJastrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs docs for <TippyGroup />

@atomiks
Copy link
Owner Author

atomiks commented Feb 8, 2019

@KubaJastrz just noticed for the types: TippyGroup doesn't take TippyProps, right? It takes GroupOptions

@KubaJastrz
Copy link
Contributor

KubaJastrz commented Feb 8, 2019

It's a combination of both. I've missed it yesterday

Edit: added in #48

@atomiks atomiks merged commit e261410 into master Feb 9, 2019
@atomiks atomiks deleted the v2 branch February 9, 2019 10:47
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.

None yet

2 participants