Skip to content

Commit 72e027e

Browse files
committed
change name and behaviour of property
1 parent b68160a commit 72e027e

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/components/VisualTour/VisualTour.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export interface VisualTourProps {
3535
prevLabel?: string;
3636
/** The step target is usable, e.g. it can be clicked. */
3737
usableStepTarget?: boolean;
38-
/** If the component is included then it starts. You can prevent this behaviour by setting this property to `false`. */
39-
dontStartAutomatically?: boolean;
38+
/** Need to be set to `true` that the tour is displayed. */
39+
isOpen?: boolean;
4040
}
4141

4242
export interface VisualTourStep {
@@ -69,9 +69,9 @@ export const VisualTour = ({
6969
nextLabel = "Next",
7070
prevLabel = "Back",
7171
usableStepTarget = false,
72-
dontStartAutomatically = false,
72+
isOpen = false,
7373
}: VisualTourProps) => {
74-
if (dontStartAutomatically) {
74+
if (isOpen === false) {
7575
return null;
7676
}
7777

src/components/VisualTour/stories/VisualTour.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const Template: StoryFn<typeof VisualTour> = (args: VisualTourProps) => {
5050
<VisualTour
5151
{...args}
5252
onClose={() => setIsOpen(false)}
53-
dontStartAutomatically={typeof isOpen !== "undefined" ? !isOpen : args.dontStartAutomatically}
53+
isOpen={typeof isOpen !== "undefined" ? isOpen : args.isOpen}
5454
/>
5555
</div>
5656
);
@@ -107,6 +107,6 @@ const defaultArgs: VisualTourProps = {
107107
},
108108
],
109109
onClose: () => {},
110-
dontStartAutomatically: true,
110+
isOpen: false,
111111
};
112112
Default.args = defaultArgs;

0 commit comments

Comments
 (0)