Skip to content

Commit 96bec84

Browse files
committed
fix stacking and image sizing
1 parent f46f939 commit 96bec84

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

src/components/VisualTour/VisualTour.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ const StepContent = ({ step }: { step: VisualTourStep }) => {
189189
<>
190190
<img
191191
src={step.image}
192-
style={{ height: "auto", width: "auto", maxHeight: "30vh", maxWidth: "100%" }}
193192
/>
194193
<Spacing size="small" />
195194
</>
@@ -210,6 +209,7 @@ const StepModal = ({ step, titleOption, onClose, actionButtons }: StepModalProps
210209
onClose={onClose}
211210
actions={actionButtons}
212211
size={step.size === "medium" ? "regular" : step.size ?? "regular"}
212+
overlayClassName={`${eccgui}-visual-tour__dialog`}
213213
>
214214
<StepContent step={step} />
215215
</SimpleDialog>
@@ -287,7 +287,7 @@ const StepPopover = ({ highlightedElement, step, titleOption, actionButtons }: S
287287
data-popper-arrow
288288
aria-hidden
289289
/>
290-
<div className={BlueprintClasses.POPOVER_CONTENT}>
290+
<div className={`${BlueprintClasses.POPOVER_CONTENT} ${eccgui}-visual-tour__overlay__content`}>
291291
<Card isOnlyLayout elevation={-1} whitespaceAmount="small">
292292
<CardHeader>
293293
<CardTitle>{step.title}</CardTitle>

src/components/VisualTour/visualTour.scss

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
.#{$eccgui}-visual-tour__highlighted-element {
88
position: relative;
99
z-index: 999999 !important;
10+
11+
.#{$eccgui}-overviewitem__actions--hiddeninteractions:has(&) {
12+
display: inherit;
13+
}
1014
}
1115

1216
.#{$eccgui}-visual-tour__focushelper {
@@ -15,6 +19,7 @@
1519
border: 2px solid $eccgui-color-accent;
1620
border-radius: var(--#{$eccgui}-visual-tour-focus-padding);
1721
box-shadow: 0 0 0 10000px $eccgui-color-modal-backdrop;
22+
z-index: 8001; // 1 over application header
1823
}
1924

2025
.#{$eccgui}-visual-tour__backdrop {
@@ -44,6 +49,7 @@
4449
}
4550

4651
.#{$eccgui}-visual-tour__overlay {
52+
z-index: 8002; // 2 over application header
4753
&--small {
4854
@extend .#{$eccgui}-tooltip--small;
4955
}
@@ -56,3 +62,17 @@
5662
@extend .#{$eccgui}-tooltip--large;
5763
}
5864
}
65+
66+
.#{$eccgui}-card__content {
67+
.#{$eccgui}-visual-tour__overlay_content &,
68+
.#{$eccgui}-visual-tour__dialog & {
69+
img {
70+
width: auto;
71+
height: auto;
72+
max-width: 100%;
73+
max-height: 100%;
74+
display: block;
75+
margin: 0 auto;
76+
}
77+
}
78+
}

0 commit comments

Comments
 (0)