webtour.js
webtour.js copied to clipboard
Add customizable button labels and auto-scroll feature to WebTour
This pull request enhances the WebTour library by introducing customizable labels for navigation buttons and adding an autoScroll option to improve usability. These changes make the library more flexible and user-friendly.
Enhancements to Button Labels:
- Added a
labelsproperty to theWebTourclass, allowing customization of button text forNext,Back,Done, andClose. Default values are provided, but users can override them. (src/index.js,README.md) [1] [2] - Updated button rendering logic to use the new
labelsproperty instead of hardcoded text. (src/index.js)
Auto-Scrolling Feature:
- Introduced an
autoScrolloption in theWebTourconfiguration. When enabled, the library automatically scrolls to the target element during navigation. (src/index.js,README.md) [1] [2] - Implemented
autoScrollbehavior in thepopoverandfixedpositioning logic to ensure smooth scrolling to the active element. (src/index.js) [1] [2]