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

[Feature Request] Update Slider Tooltip #3465

Open
CodeVisionEvgen opened this issue Jul 13, 2024 · 3 comments
Open

[Feature Request] Update Slider Tooltip #3465

CodeVisionEvgen opened this issue Jul 13, 2024 · 3 comments

Comments

@CodeVisionEvgen
Copy link

CodeVisionEvgen commented Jul 13, 2024

Is your feature request related to a problem? Please describe.

I recommend adding a new renderTooltip parameter that has the value Slider as the first argument.
Example:

  const formatTime = (time: number) => {
    const minutes = Math.floor(time / 60);
    const seconds = Math.floor(time % 60);
    return `${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;
  };
...
...
<Slider showToolTip renderTooltip={(value)=> <p>{formatTime(value)}</p>}/>

Describe the solution you'd like

none

Describe alternatives you've considered

none

Screenshots or Videos

No response

Copy link

linear bot commented Jul 13, 2024

@pratyush3124
Copy link
Contributor

would like to work on this feature

@ararTP
Copy link

ararTP commented Aug 15, 2024

Any news/ workarounds?
one workaround would be to use :

tooltipProps={{
    content: formatTime(stateValue)
}}

but it won't work on multiple thumbs

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

No branches or pull requests

3 participants