Skip to content

feat: add borderClass prop to allow a custom border class #745

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

Merged
merged 2 commits into from
Oct 13, 2022

Conversation

danny-does-stuff
Copy link
Contributor

Allow overriding the default border class name "border" with a custom class name. Currently, when using a border it adds the class name "border", which is pretty generic and can be overridden by other styles (notably, bootstrap uses the class "border", overriding any borderColor provided to react-tooltip). This change makes it so that the user can provide a custom class name for the border class.

Allow overriding the default border class name "border" with a custom class name
| delayHide | data-delay-hide | Number | | `<p data-tip="tooltip" data-delay-hide='1000'></p>` or `<ReactTooltip delayHide={1000} />` |
| delayShow | data-delay-show | Number | | `<p data-tip="tooltip" data-delay-show='1000'></p>` or `<ReactTooltip delayShow={1000} />` |
| delayUpdate | data-delay-update | Number | | `<p data-tip="tooltip" data-delay-update='1000'></p>` or `<ReactTooltip delayUpdate={1000} />` Sets a delay in calling getContent if the tooltip is already shown and you mouse over another target |
| insecure | null | Bool | true, false | Whether to inject the style header into the page dynamically (violates CSP style-src but is a convenient default) |
| border | data-border | Bool | true, false | Add one pixel white border |
| borderClass | data-border-class | String | e.g. custom-border-class | A custom class name to use for the border - enabled by the `border` prop |
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All changes in this file besides this line were added automatically by the pre-commit hook

@danielbarion
Copy link
Member

Hi @dannyharding10, can you update your PR with the master branch, please?

I'll take a look at that one after it's updated with Master.

Thanks!

@danny-does-stuff
Copy link
Contributor Author

danny-does-stuff commented Oct 13, 2022

@danielbarion Updated! I think I did it right...

@danielbarion danielbarion merged commit 9844a6c into ReactTooltip:master Oct 13, 2022
@danielbarion
Copy link
Member

Thank you @dannyharding10!

That improvement will be released together in the next version, we will probably release that soon.

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

Successfully merging this pull request may close these issues.

2 participants