customize innerSelector and arrowSelector in the Tooltip Class
See original GitHub issueAt https://github.com/FezVrasta/popper.js/blob/master/packages/tooltip/src/index.js there’s a initialization of the instance properties arrowSelector
& innerSelector
//
// Defaults
//
arrowSelector = '.tooltip-arrow, .tooltip__arrow';
innerSelector = '.tooltip-inner, .tooltip__inner';
but this values cannot be changed. Shouldn’t these values be accepted by the constructor to be able to customize them?
Something like…
export default class Tooltip {
...
arrowSelector = '.tooltip-arrow, .tooltip__arrow';
innerSelector = '.tooltip-inner, .tooltip__inner';
constructor(reference, options) {
...
if (options.arrowSelector) this.arrowSelector = options.arrowSelector
if (options.innerSelector) this.innerSelector = arrowSelector.innerSelector
}
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
customize innerSelector and arrowSelector in the Tooltip Class
So, just want to clarify that I ran into this issue: is there a plan to release a new version of tooltip.js to...
Read more >tooltip.js - UNPKG
n * The outermost wrapper element should have the `.tooltip` class. ... Defaults\n //\n arrowSelector = '.tooltip-arrow, .tooltip__arrow';\n innerSelector ...
Read more >v-tooltip - npm
arrowSelector - CSS selector to get the arrow element in the tooltip template. innerSelector - CSS selector to get the inner content element ......
Read more >v-tooltip - Awesome JS
Now uses Popper.js; You can now customize the tooltip template, ... Tooltip arrowSelector and innerSelector options (and corresponding global options).
Read more >Styling the arrow on bootstrap tooltips - css - Stack Overflow
You can use this to change tooltip-arrow color .tooltip.bottom .tooltip-arrow { top: 0; left: 50%; margin-left: -5px; border-bottom-color: #000000; ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So, just want to clarify that I ran into this issue: is there a plan to release a new version of tooltip.js to NPM to include these changes? It kind of sucks that the web documentation doesn’t match what’s published.
Feel free to send a PR to update them.