Skip to content

Commit 4d9de02

Browse files
fredericbahrnilbuild
authored andcommitted
feat: add 'data' property to DriveStep for custom logic support
Before it was not possible to pass custom data to the `DriveStep` interface. This limits the possiblities within a hook to execute custom logic based on the current step. Fixes #539
1 parent 4637157 commit 4d9de02

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

docs/src/content/guides/configuration.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,9 @@ type DriveStep = {
258258
// Whether to disable interaction with the highlighted element. (default: false)
259259
disableActiveInteraction?: boolean;
260260

261+
// Arbitrary data that you can pass to the step in order to support complex custom logic in hooks.
262+
data?: Record<string, any>;
263+
261264
// Callback when the current step is deselected,
262265
// about to be highlighted or highlighted.
263266
// Each callback receives the following parameters:

src/driver.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export type DriveStep = {
2020
onDeselected?: DriverHook;
2121
popover?: Popover;
2222
disableActiveInteraction?: boolean;
23+
data?: Record<string, any>;
2324
};
2425

2526
export interface Driver {

0 commit comments

Comments
 (0)