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

[FEAT REQ] opacity prop #1051

Closed
gabrieljablonski opened this issue Jul 2, 2023 · 2 comments · Fixed by #1054
Closed

[FEAT REQ] opacity prop #1051

gabrieljablonski opened this issue Jul 2, 2023 · 2 comments · Fixed by #1054

Comments

@gabrieljablonski
Copy link
Member

gabrieljablonski commented Jul 2, 2023

Is your feature request related to a problem? Please describe.
Previously, the way to change the tooltip opacity (from the 0.9 default value) was to set the CSS variable like so:

:root {
  --rt-opacity: 1;
}

I believe the recent change in the way the styles are injected broke this.

Describe the solution you'd like

  • Add a opacity tooltip prop to override the default value.
  • Add a check on the style prop and console.warn() if opacity is set (only if env !== 'production'), advising to use the prop instead (same as done with border).

Additional context
As mentioned on #1010 (comment).

@danielbarion
Copy link
Member

I didn't realize the CSS tokens override is no longer working after the CSS injection feature, but this makes sense! Nice catch!

This gave me one idea: #1052

Please feel free to continue the implementation

@gabrieljablonski
Copy link
Member Author

Available with [email protected].

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

Successfully merging a pull request may close this issue.

2 participants