Skip to content

Commit ef5b79b

Browse files
authored
Merge pull request #211 from mashmatrix/fix-winedge-icon-button
Change svg icon in button not to accept pointer events
2 parents ea48346 + 2d38b1b commit ef5b79b

File tree

13 files changed

+425
-86
lines changed

13 files changed

+425
-86
lines changed

.storybook/__storyshots__/Button.shot

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,11 @@ exports[`Button Icon`] = `
11571157
<svg
11581158
aria-hidden={true}
11591159
className="slds-button__icon"
1160-
style={undefined}>
1160+
style={
1161+
Object {
1162+
"pointerEvents": "none",
1163+
}
1164+
}>
11611165
<use
11621166
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#settings" />
11631167
</svg>
@@ -1694,7 +1698,11 @@ exports[`Button Icon Border`] = `
16941698
<svg
16951699
aria-hidden={true}
16961700
className="slds-button__icon"
1697-
style={undefined}>
1701+
style={
1702+
Object {
1703+
"pointerEvents": "none",
1704+
}
1705+
}>
16981706
<use
16991707
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#settings" />
17001708
</svg>
@@ -2238,7 +2246,11 @@ exports[`Button Icon Border and Filled`] = `
22382246
<svg
22392247
aria-hidden={true}
22402248
className="slds-button__icon"
2241-
style={undefined}>
2249+
style={
2250+
Object {
2251+
"pointerEvents": "none",
2252+
}
2253+
}>
22422254
<use
22432255
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#settings" />
22442256
</svg>
@@ -2892,7 +2904,11 @@ exports[`Button Icon Container`] = `
28922904
<svg
28932905
aria-hidden={true}
28942906
className="slds-button__icon"
2895-
style={undefined}>
2907+
style={
2908+
Object {
2909+
"pointerEvents": "none",
2910+
}
2911+
}>
28962912
<use
28972913
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#settings" />
28982914
</svg>
@@ -3436,7 +3452,11 @@ exports[`Button Icon Inverse`] = `
34363452
<svg
34373453
aria-hidden={true}
34383454
className="slds-button__icon slds-button__icon--inverse"
3439-
style={undefined}>
3455+
style={
3456+
Object {
3457+
"pointerEvents": "none",
3458+
}
3459+
}>
34403460
<use
34413461
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#close" />
34423462
</svg>
@@ -4098,7 +4118,11 @@ exports[`Button Icon Inverse in dark background`] = `
40984118
<svg
40994119
aria-hidden={true}
41004120
className="slds-button__icon slds-button__icon--inverse"
4101-
style={undefined}>
4121+
style={
4122+
Object {
4123+
"pointerEvents": "none",
4124+
}
4125+
}>
41024126
<use
41034127
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#close" />
41044128
</svg>
@@ -9059,7 +9083,11 @@ exports[`Neutral with left icon`] = `
90599083
<svg
90609084
aria-hidden={true}
90619085
className="slds-button__icon slds-button__icon--left"
9062-
style={undefined}>
9086+
style={
9087+
Object {
9088+
"pointerEvents": "none",
9089+
}
9090+
}>
90639091
<use
90649092
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#download" />
90659093
</svg>
@@ -9670,7 +9698,11 @@ exports[`Neutral with right icon`] = `
96709698
<svg
96719699
aria-hidden={true}
96729700
className="slds-button__icon slds-button__icon--right"
9673-
style={undefined}>
9701+
style={
9702+
Object {
9703+
"pointerEvents": "none",
9704+
}
9705+
}>
96749706
<use
96759707
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#down" />
96769708
</svg>

.storybook/__storyshots__/ButtonGroup.shot

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ exports[`Default`] = `
7878
<svg
7979
aria-hidden={true}
8080
className="slds-button__icon slds-button__icon--left"
81-
style={undefined}>
81+
style={
82+
Object {
83+
"pointerEvents": "none",
84+
}
85+
}>
8286
<use
8387
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#download" />
8488
</svg>
@@ -1044,7 +1048,11 @@ exports[`Default disalbed`] = `
10441048
<svg
10451049
aria-hidden={true}
10461050
className="slds-button__icon slds-button__icon--left"
1047-
style={undefined}>
1051+
style={
1052+
Object {
1053+
"pointerEvents": "none",
1054+
}
1055+
}>
10481056
<use
10491057
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#download" />
10501058
</svg>
@@ -2026,7 +2034,11 @@ exports[`Inverse`] = `
20262034
<svg
20272035
aria-hidden={true}
20282036
className="slds-button__icon slds-button__icon--left slds-button__icon--inverse"
2029-
style={undefined}>
2037+
style={
2038+
Object {
2039+
"pointerEvents": "none",
2040+
}
2041+
}>
20302042
<use
20312043
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#download" />
20322044
</svg>
@@ -2054,7 +2066,11 @@ exports[`Inverse`] = `
20542066
<svg
20552067
aria-hidden={true}
20562068
className="slds-button__icon slds-button__icon--inverse"
2057-
style={undefined}>
2069+
style={
2070+
Object {
2071+
"pointerEvents": "none",
2072+
}
2073+
}>
20582074
<use
20592075
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#down" />
20602076
</svg>
@@ -3942,7 +3958,11 @@ exports[`More`] = `
39423958
<svg
39433959
aria-hidden={true}
39443960
className="slds-button__icon slds-button__icon--left"
3945-
style={undefined}>
3961+
style={
3962+
Object {
3963+
"pointerEvents": "none",
3964+
}
3965+
}>
39463966
<use
39473967
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#download" />
39483968
</svg>
@@ -3970,7 +3990,11 @@ exports[`More`] = `
39703990
<svg
39713991
aria-hidden={true}
39723992
className="slds-button__icon"
3973-
style={undefined}>
3993+
style={
3994+
Object {
3995+
"pointerEvents": "none",
3996+
}
3997+
}>
39743998
<use
39753999
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#down" />
39764000
</svg>

.storybook/__storyshots__/Datepicker.shot

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ exports[`Controlled with knobs`] = `
8484
<svg
8585
aria-hidden={true}
8686
className="slds-button__icon"
87-
style={undefined}>
87+
style={
88+
Object {
89+
"pointerEvents": "none",
90+
}
91+
}>
8892
<use
8993
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#left" />
9094
</svg>
@@ -107,7 +111,11 @@ exports[`Controlled with knobs`] = `
107111
<svg
108112
aria-hidden={true}
109113
className="slds-button__icon"
110-
style={undefined}>
114+
style={
115+
Object {
116+
"pointerEvents": "none",
117+
}
118+
}>
111119
<use
112120
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#right" />
113121
</svg>
@@ -1474,7 +1482,11 @@ exports[`Default`] = `
14741482
<svg
14751483
aria-hidden={true}
14761484
className="slds-button__icon"
1477-
style={undefined}>
1485+
style={
1486+
Object {
1487+
"pointerEvents": "none",
1488+
}
1489+
}>
14781490
<use
14791491
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#left" />
14801492
</svg>
@@ -1497,7 +1509,11 @@ exports[`Default`] = `
14971509
<svg
14981510
aria-hidden={true}
14991511
className="slds-button__icon"
1500-
style={undefined}>
1512+
style={
1513+
Object {
1514+
"pointerEvents": "none",
1515+
}
1516+
}>
15011517
<use
15021518
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#right" />
15031519
</svg>
@@ -2807,7 +2823,11 @@ exports[`Extension Rendering`] = `
28072823
<svg
28082824
aria-hidden={true}
28092825
className="slds-button__icon"
2810-
style={undefined}>
2826+
style={
2827+
Object {
2828+
"pointerEvents": "none",
2829+
}
2830+
}>
28112831
<use
28122832
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#left" />
28132833
</svg>
@@ -2830,7 +2850,11 @@ exports[`Extension Rendering`] = `
28302850
<svg
28312851
aria-hidden={true}
28322852
className="slds-button__icon"
2833-
style={undefined}>
2853+
style={
2854+
Object {
2855+
"pointerEvents": "none",
2856+
}
2857+
}>
28342858
<use
28352859
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#right" />
28362860
</svg>

0 commit comments

Comments
 (0)