Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e220bc5

Browse files
committedMar 19, 2025·
feat: Add Skip Button to Tour for Improved Usability (#261)
Signed-off-by: surya4419 <[email protected]>
1 parent 5a7bb81 commit e220bc5

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
 

‎src/components/Tour.ts

+28
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import "shepherd.js/dist/css/shepherd.css";
33

44
const style = document.createElement("style");
55
style.textContent = `
6+
.shepherd-button-secondary {
7+
background-color: #6c757d !important;
8+
}
69
.shepherd-button {
710
background-color: #050c40 !important;
811
color: white !important;
@@ -22,6 +25,11 @@ tour.addStep({
2225
id: "intro",
2326
text: "Welcome to the Template Playground! This brief tour will help you get acquainted with the key features of the platform.",
2427
buttons: [
28+
{
29+
text: "Skip",
30+
action: tour.cancel,
31+
classes: "shepherd-button-secondary",
32+
},
2533
{
2634
text: "Next",
2735
action: () => tour.next(),
@@ -37,6 +45,11 @@ tour.addStep({
3745
on: "bottom",
3846
},
3947
buttons: [
48+
{
49+
text: "Skip",
50+
action: tour.cancel,
51+
classes: "shepherd-button-secondary",
52+
},
4053
{
4154
text: "Next",
4255
action: () => tour.next(),
@@ -52,6 +65,11 @@ tour.addStep({
5265
on: "bottom",
5366
},
5467
buttons: [
68+
{
69+
text: "Skip",
70+
action: tour.cancel,
71+
classes: "shepherd-button-secondary",
72+
},
5573
{
5674
text: "Next",
5775
action: () => tour.next(),
@@ -67,6 +85,11 @@ tour.addStep({
6785
on: "bottom",
6886
},
6987
buttons: [
88+
{
89+
text: "Skip",
90+
action: tour.cancel,
91+
classes: "shepherd-button-secondary",
92+
},
7093
{
7194
text: "Next",
7295
action: () => tour.next(),
@@ -82,6 +105,11 @@ tour.addStep({
82105
on: "bottom",
83106
},
84107
buttons: [
108+
{
109+
text: "Skip",
110+
action: tour.cancel,
111+
classes: "shepherd-button-secondary",
112+
},
85113
{
86114
text: "Next",
87115
action: () => tour.next(),

0 commit comments

Comments
 (0)
Please sign in to comment.