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
This commit is contained in:
Frederic Bahr
2026-06-25 11:29:46 +01:00
committed by Kamran Ahmed
parent 46371576c0
commit 4d9de02a5d
2 changed files with 4 additions and 0 deletions
@@ -258,6 +258,9 @@ type DriveStep = {
// Whether to disable interaction with the highlighted element. (default: false)
disableActiveInteraction?: boolean;
// Arbitrary data that you can pass to the step in order to support complex custom logic in hooks.
data?: Record<string, any>;
// Callback when the current step is deselected,
// about to be highlighted or highlighted.
// Each callback receives the following parameters:
+1
View File
@@ -20,6 +20,7 @@ export type DriveStep = {
onDeselected?: DriverHook;
popover?: Popover;
disableActiveInteraction?: boolean;
data?: Record<string, any>;
};
export interface Driver {