Skip to content

Commit b99ae95

Browse files
author
Sean Gates
authored
Infotip: location fixes - Storybook examples (eBay#952)
1 parent d55c2ff commit b99ae95

File tree

7 files changed

+37
-37
lines changed

7 files changed

+37
-37
lines changed

src/components/components/ebay-tooltip-overlay/constants.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,80 +8,80 @@ exports.pointerStyles = {
88
transform: 'translateX(16px) translateY(-50%)',
99
left: '100%',
1010
right: 'auto',
11-
top: '50%',
11+
top: '0',
1212
bottom: 'auto'
1313
},
1414
'left-top': {
1515
transform: 'translateX(16px)',
1616
left: '100%',
1717
right: 'auto',
18-
top: '-8px',
18+
top: '-100%',
1919
bottom: 'auto'
2020
},
2121
'left-bottom': {
2222
transform: 'translateX(16px)',
2323
left: '100%',
2424
right: 'auto',
2525
top: 'auto',
26-
bottom: '-8px'
26+
bottom: '-10px'
2727
},
2828
'right': {
2929
transform: 'translateX(-16px) translateY(-50%)',
3030
left: 'auto',
3131
right: '100%',
32-
top: '50%',
32+
top: '0',
3333
bottom: 'auto'
3434
},
3535
'right-top': {
3636
transform: 'translateX(-16px)',
3737
left: 'auto',
3838
right: '100%',
39-
top: '-8px',
39+
top: '-100%',
4040
bottom: 'auto'
4141
},
4242
'right-bottom': {
4343
transform: 'translateX(-16px)',
4444
left: 'auto',
4545
right: '100%',
4646
top: 'auto',
47-
bottom: '-8px'
47+
bottom: '-50%'
4848
},
4949
'top': {
5050
transform: 'translateX(-50%)',
5151
left: '50%',
5252
right: 'auto',
53-
top: 'calc(100% + 16px)',
53+
top: 'calc(100% + 2px)',
5454
bottom: 'auto'
5555
},
5656
'top-left': {
57-
left: '0px',
57+
left: '-10px',
5858
right: 'auto',
59-
top: 'calc(100% + 16px)',
59+
top: 'calc(100% + 2px)',
6060
bottom: 'auto'
6161
},
6262
'top-right': {
6363
left: 'auto',
64-
right: '0px',
65-
top: 'calc(100% + 16px)',
64+
right: '-10px',
65+
top: 'calc(100% + 2px)',
6666
bottom: 'auto'
6767
},
6868
'bottom-right': {
6969
left: 'auto',
70-
right: '0px',
70+
right: '-10px',
7171
top: 'auto',
72-
bottom: 'calc(100% + 16px)'
72+
bottom: 'calc(100% + 12px)'
7373
},
7474
'bottom-left': {
75-
left: '0px',
75+
left: '-10px',
7676
right: 'auto',
7777
top: 'auto',
78-
bottom: 'calc(100% + 16px)'
78+
bottom: 'calc(100% + 12px)'
7979
},
8080
'bottom': {
8181
transform: 'translateX(-50%)',
8282
left: '50%',
8383
right: 'auto',
8484
top: 'auto',
85-
bottom: 'calc(100% + 16px)'
85+
bottom: 'calc(100% + 12px)'
8686
}
8787
};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ebay-infotip a11y-close-text="Dismiss infotip" aria-label="Important information">
1+
<ebay-infotip a11y-close-text="Dismiss infotip" aria-label="Important information" pointer="left-top">
22
<ebay-infotip-heading>Important</ebay-infotip-heading>
33
<ebay-infotip-content><p>This is some important info</p></ebay-infotip-content>
44
</ebay-infotip>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ebay-infotip a11y-close-text="Dismiss infotip" aria-label="Important information" icon="settings">
1+
<ebay-infotip a11y-close-text="Dismiss infotip" aria-label="Important information" icon="settings" pointer="left-top">
22
<ebay-infotip-heading>Important</ebay-infotip-heading>
33
<ebay-infotip-content><p>This is some important info</p></ebay-infotip-content>
44
</ebay-infotip>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ebay-infotip a11y-close-text="Dismiss infotip" aria-label="Important information" disabled>
1+
<ebay-infotip a11y-close-text="Dismiss infotip" aria-label="Important information" pointer="left-top" disabled>
22
<ebay-infotip-heading>Important</ebay-infotip-heading>
33
<ebay-infotip-content><p>This is some important info</p></ebay-infotip-content>
44
</ebay-infotip>

src/components/ebay-infotip/examples/04-intotip-in-paragraph/template.marko

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</em>
66
<p>
77
Some paragraph content
8-
<ebay-infotip a11y-close-text="Dismiss infotip" aria-label="Important information">
8+
<ebay-infotip a11y-close-text="Dismiss infotip" aria-label="Important information" pointer="left-top">
99
<ebay-infotip-heading>Important</ebay-infotip-heading>
1010
<ebay-infotip-content>This is some important info</ebay-infotip-content>
1111
</ebay-infotip>

src/components/ebay-infotip/template.marko

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<button
2121
w-id="host"
2222
w-preserve-attrs="aria-expanded,aria-controls,aria-describedby"
23-
class="infotip__host icon-btn"
23+
class="icon-btn infotip__host"
2424
type="button"
2525
disabled=data.disabled
2626
aria-label=data.ariaLabel>

src/components/ebay-tooltip/test/location-styles.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,84 +3,84 @@
33
"overlayTransform": "translateX(16px) translateY(-50%)",
44
"overlayLeft": "100%",
55
"overlayRight": "auto",
6-
"overlayTop": "50%",
6+
"overlayTop": "0px",
77
"overlayBottom": "auto"
88
},
99
"left-top": {
1010
"overlayTransform": "translateX(16px)",
1111
"overlayLeft": "100%",
1212
"overlayRight": "auto",
13-
"overlayTop": "-8px",
13+
"overlayTop": "-100%",
1414
"overlayBottom": "auto"
1515
},
1616
"left-bottom": {
1717
"overlayTransform": "translateX(16px)",
1818
"overlayLeft": "100%",
1919
"overlayRight": "auto",
2020
"overlayTop": "auto",
21-
"overlayBottom": "-8px"
21+
"overlayBottom": "-10px"
2222
},
2323
"right": {
2424
"overlayTransform": "translateX(-16px) translateY(-50%)",
2525
"overlayLeft": "auto",
2626
"overlayRight": "100%",
27-
"overlayTop": "50%",
27+
"overlayTop": "0px",
2828
"overlayBottom": "auto"
2929
},
3030
"right-top": {
3131
"overlayTransform": "translateX(-16px)",
3232
"overlayLeft": "auto",
3333
"overlayRight": "100%",
34-
"overlayTop": "-8px",
34+
"overlayTop": "-100%",
3535
"overlayBottom": "auto"
3636
},
3737
"right-bottom": {
3838
"overlayTransform": "translateX(-16px)",
3939
"overlayLeft": "auto",
4040
"overlayRight": "100%",
4141
"overlayTop": "auto",
42-
"overlayBottom": "-8px"
42+
"overlayBottom": "-50%"
4343
},
4444
"top": {
4545
"overlayTransform": "translateX(-50%)",
4646
"overlayLeft": "50%",
4747
"overlayRight": "auto",
48-
"overlayTop": "calc(100% + 16px)",
48+
"overlayTop": "calc(100% + 2px)",
4949
"overlayBottom": "auto"
5050
},
5151
"top-left": {
5252
"overlayTransform": "",
53-
"overlayLeft": "0px",
53+
"overlayLeft": "-10px",
5454
"overlayRight": "auto",
55-
"overlayTop": "calc(100% + 16px)",
55+
"overlayTop": "calc(100% + 2px)",
5656
"overlayBottom": "auto"
5757
},
5858
"top-right": {
5959
"overlayTransform": "",
6060
"overlayLeft": "auto",
61-
"overlayRight": "0px",
62-
"overlayTop": "calc(100% + 16px)",
61+
"overlayRight": "-10px",
62+
"overlayTop": "calc(100% + 2px)",
6363
"overlayBottom": "auto"
6464
},
6565
"bottom-right": {
6666
"overlayTransform": "",
6767
"overlayLeft": "auto",
68-
"overlayRight": "0px",
68+
"overlayRight": "-10px",
6969
"overlayTop": "auto",
70-
"overlayBottom": "calc(100% + 16px)"
70+
"overlayBottom": "calc(100% + 12px)"
7171
},
7272
"bottom-left": {
7373
"overlayTransform": "",
74-
"overlayLeft": "0px",
74+
"overlayLeft": "-10px",
7575
"overlayRight": "auto",
7676
"overlayTop": "auto",
77-
"overlayBottom": "calc(100% + 16px)"
77+
"overlayBottom": "calc(100% + 12px)"
7878
},
7979
"bottom": {
8080
"overlayTransform": "translateX(-50%)",
8181
"overlayLeft": "50%",
8282
"overlayRight": "auto",
8383
"overlayTop": "auto",
84-
"overlayBottom": "calc(100% + 16px)"
84+
"overlayBottom": "calc(100% + 12px)"
8585
}
8686
}

0 commit comments

Comments
 (0)