1
Fork 0
tildes-shepherd/source/tours/shared/tour-error.tsx

26 lines
507 B
TypeScript
Raw Normal View History

import Shepherd from "shepherd.js";
import {renderInContainer} from "../utilities.js";
export function showTourError(text: string) {
const tour = new Shepherd.Tour({
defaultStepOptions: {
buttons: [
{
classes: "btn",
text: "Continue",
action() {
this.complete();
},
},
],
},
useModalOverlay: true,
});
tour.addStep({
text: renderInContainer(<p class="tish-warning">{text}</p>),
});
tour.start();
}