File size: 571 Bytes
acbae00 d538d71 3223525 d538d71 acbae00 3223525 d538d71 acbae00 d538d71 acbae00 d538d71 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import { useEffect } from "react";
import { Config, driver } from "driver.js";
import "driver.js/dist/driver.css";
import type { DriveStep } from "driver.js";
type SimpleHighlightProps = {
config?: Config;
step: DriveStep;
};
export function SimpleHighlight(props: SimpleHighlightProps) {
const { config, step } = props;
function onClick() {
const driverObj = driver(config);
driverObj.highlight(step);
}
return (
<button onClick={onClick} className="w-full rounded-md bg-black p-2 text-white">
Highlight Something
</button>
);
}
|