@@ -27,46 +29,52 @@ import Container from "../components/Container.astro";
-
+
- Usecases
- Due to it's extensive API, driver.js can be used for a wide range of use cases.
+ Examples
+ Here are just a few examples; find more in the documentation.
+
+
+
+ Due to it's extensive API, driver.js can be used for a wide range of use
+ cases.
-
-
-
Onboard Users
-
- Onboard your users by explaining how to use your product and answer common
- questions.
-
-
-
-
-
-
- Remove Distractions
-
-
- With highlight feature, you can remove distractions and focus your users attention on what matters.
-
-
-
-
-
-
Contextual Help
-
- Provide contextual help for your users, explain how to use your product and answer common questions.
-
-
-
-
-
-
Feature Adoption
-
- Highlight new features, explain how to use them and make sure your users don't miss them.
-
-
+
+
+
+
+
diff --git a/src/popover.ts b/src/popover.ts
index 6ca828d..d79c502 100644
--- a/src/popover.ts
+++ b/src/popover.ts
@@ -102,7 +102,6 @@ export function renderPopover(element: Element, step: DriveStep) {
const showFooter =
showButtonsConfig?.includes("next") ||
showButtonsConfig?.includes("previous") ||
- showButtonsConfig?.includes("close") ||
showProgressConfig;
popover.closeButton.style.display = showButtonsConfig.includes("close") ? "block" : "none";
@@ -160,7 +159,10 @@ export function renderPopover(element: Element, step: DriveStep) {
// If the user has provided a custom callback, call it
// otherwise, emit the event.
if (onNextClick) {
- return onNextClick(element, step);
+ return onNextClick(element, step, {
+ config: getConfig(),
+ state: getState(),
+ });
} else {
return emit("nextClick");
}
@@ -168,7 +170,10 @@ export function renderPopover(element: Element, step: DriveStep) {
if (target.classList.contains("driver-popover-prev-btn")) {
if (onPrevClick) {
- return onPrevClick(element, step);
+ return onPrevClick(element, step, {
+ config: getConfig(),
+ state: getState(),
+ });
} else {
return emit("prevClick");
}
@@ -176,7 +181,10 @@ export function renderPopover(element: Element, step: DriveStep) {
if (target.classList.contains("driver-popover-close-btn")) {
if (onCloseClick) {
- return onCloseClick(element, step);
+ return onCloseClick(element, step, {
+ config: getConfig(),
+ state: getState(),
+ });
} else {
return emit("closeClick");
}