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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any way to render custom component ? #111

Open
tokomeno opened this issue Oct 26, 2022 · 2 comments
Open

Any way to render custom component ? #111

tokomeno opened this issue Oct 26, 2022 · 2 comments
Labels

Comments

@tokomeno
Copy link

tokomeno commented Oct 26, 2022

I want to show a tooltip when the line is elapsed is there any way to do that?

Or can we extend the liberty to accept the children as render and pass the variable if text is elapsed

    {typeof children === 'function' && children({
         isElapsed: true or false,
         elapsedText: textWhichWasPassed
     })
@tokomeno tokomeno changed the title Any way to render custom component?I want to show tooltip when the line is elapsed is there any way to do that? Any way to render custom component ? Oct 26, 2022
@xiaody
Copy link
Owner

xiaody commented Oct 27, 2022

What about wrapping LinesEllipsis with your Tooltip, and use onReflow to decide whether to show the tooltip.

@tokomeno
Copy link
Author

Good solution, worked for my uscase thanks!

Still find usfull to have an option to pass children as function if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants