Skip to content

Commit 43066d7

Browse files
committed
Update storyshots for Icons
Fix tests
1 parent 51ded5a commit 43066d7

File tree

16 files changed

+3720
-5580
lines changed

16 files changed

+3720
-5580
lines changed

.storybook/__storyshots__/Button.shot

Lines changed: 32 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,12 +1162,10 @@ exports[`Button Icon`] = `
11621162
<svg
11631163
aria-hidden={true}
11641164
className="slds-button__icon"
1165-
dangerouslySetInnerHTML={
1166-
Object {
1167-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#settings\"></use>",
1168-
}
1169-
}
1170-
style={undefined} />
1165+
style={undefined}>
1166+
<use
1167+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#settings" />
1168+
</svg>
11711169
</button>
11721170
</div>
11731171
<a
@@ -1728,12 +1726,10 @@ exports[`Button Icon Border`] = `
17281726
<svg
17291727
aria-hidden={true}
17301728
className="slds-button__icon"
1731-
dangerouslySetInnerHTML={
1732-
Object {
1733-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#settings\"></use>",
1734-
}
1735-
}
1736-
style={undefined} />
1729+
style={undefined}>
1730+
<use
1731+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#settings" />
1732+
</svg>
17371733
</button>
17381734
</div>
17391735
<a
@@ -2301,12 +2297,10 @@ exports[`Button Icon Border and Filled`] = `
23012297
<svg
23022298
aria-hidden={true}
23032299
className="slds-button__icon"
2304-
dangerouslySetInnerHTML={
2305-
Object {
2306-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#settings\"></use>",
2307-
}
2308-
}
2309-
style={undefined} />
2300+
style={undefined}>
2301+
<use
2302+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#settings" />
2303+
</svg>
23102304
</button>
23112305
</div>
23122306
</div>
@@ -2984,12 +2978,10 @@ exports[`Button Icon Container`] = `
29842978
<svg
29852979
aria-hidden={true}
29862980
className="slds-button__icon"
2987-
dangerouslySetInnerHTML={
2988-
Object {
2989-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#settings\"></use>",
2990-
}
2991-
}
2992-
style={undefined} />
2981+
style={undefined}>
2982+
<use
2983+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#settings" />
2984+
</svg>
29932985
</button>
29942986
</div>
29952987
<a
@@ -3557,12 +3549,10 @@ exports[`Button Icon Inverse`] = `
35573549
<svg
35583550
aria-hidden={true}
35593551
className="slds-button__icon slds-button__icon--inverse"
3560-
dangerouslySetInnerHTML={
3561-
Object {
3562-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#close\"></use>",
3563-
}
3564-
}
3565-
style={undefined} />
3552+
style={undefined}>
3553+
<use
3554+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#close" />
3555+
</svg>
35663556
</button>
35673557
</div>
35683558
</div>
@@ -4248,12 +4238,10 @@ exports[`Button Icon Inverse in dark background`] = `
42484238
<svg
42494239
aria-hidden={true}
42504240
className="slds-button__icon slds-button__icon--inverse"
4251-
dangerouslySetInnerHTML={
4252-
Object {
4253-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#close\"></use>",
4254-
}
4255-
}
4256-
style={undefined} />
4241+
style={undefined}>
4242+
<use
4243+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#close" />
4244+
</svg>
42574245
</button>
42584246
</div>
42594247
</div>
@@ -9427,12 +9415,10 @@ exports[`Neutral with left icon`] = `
94279415
<svg
94289416
aria-hidden={true}
94299417
className="slds-button__icon slds-button__icon--left"
9430-
dangerouslySetInnerHTML={
9431-
Object {
9432-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#download\"></use>",
9433-
}
9434-
}
9435-
style={undefined} />
9418+
style={undefined}>
9419+
<use
9420+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#download" />
9421+
</svg>
94369422
Button Neutral
94379423
</button>
94389424
</div>
@@ -10067,12 +10053,10 @@ exports[`Neutral with right icon`] = `
1006710053
<svg
1006810054
aria-hidden={true}
1006910055
className="slds-button__icon slds-button__icon--right"
10070-
dangerouslySetInnerHTML={
10071-
Object {
10072-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#down\"></use>",
10073-
}
10074-
}
10075-
style={undefined} />
10056+
style={undefined}>
10057+
<use
10058+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#down" />
10059+
</svg>
1007610060
</button>
1007710061
</div>
1007810062
<a

.storybook/__storyshots__/ButtonGroup.shot

Lines changed: 24 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,10 @@ exports[`Default`] = `
2929
<svg
3030
aria-hidden={true}
3131
className="slds-button__icon slds-button__icon--left"
32-
dangerouslySetInnerHTML={
33-
Object {
34-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#download\"></use>",
35-
}
36-
}
37-
style={undefined} />
32+
style={undefined}>
33+
<use
34+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#download" />
35+
</svg>
3836
Download
3937
</button>
4038
</div>
@@ -1024,12 +1022,10 @@ exports[`Default disalbed`] = `
10241022
<svg
10251023
aria-hidden={true}
10261024
className="slds-button__icon slds-button__icon--left"
1027-
dangerouslySetInnerHTML={
1028-
Object {
1029-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#download\"></use>",
1030-
}
1031-
}
1032-
style={undefined} />
1025+
style={undefined}>
1026+
<use
1027+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#download" />
1028+
</svg>
10331029
Download
10341030
</button>
10351031
</div>
@@ -2035,12 +2031,10 @@ exports[`Inverse`] = `
20352031
<svg
20362032
aria-hidden={true}
20372033
className="slds-button__icon slds-button__icon--left slds-button__icon--inverse"
2038-
dangerouslySetInnerHTML={
2039-
Object {
2040-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#download\"></use>",
2041-
}
2042-
}
2043-
style={undefined} />
2034+
style={undefined}>
2035+
<use
2036+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#download" />
2037+
</svg>
20442038
Download
20452039
</button>
20462040
<div
@@ -2065,12 +2059,10 @@ exports[`Inverse`] = `
20652059
<svg
20662060
aria-hidden={true}
20672061
className="slds-button__icon slds-button__icon--inverse"
2068-
dangerouslySetInnerHTML={
2069-
Object {
2070-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#down\"></use>",
2071-
}
2072-
}
2073-
style={undefined} />
2062+
style={undefined}>
2063+
<use
2064+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#down" />
2065+
</svg>
20742066
</button>
20752067
</div>
20762068
</div>
@@ -3982,12 +3974,10 @@ exports[`More`] = `
39823974
<svg
39833975
aria-hidden={true}
39843976
className="slds-button__icon slds-button__icon--left"
3985-
dangerouslySetInnerHTML={
3986-
Object {
3987-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#download\"></use>",
3988-
}
3989-
}
3990-
style={undefined} />
3977+
style={undefined}>
3978+
<use
3979+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#download" />
3980+
</svg>
39913981
Download
39923982
</button>
39933983
<div
@@ -4012,12 +4002,10 @@ exports[`More`] = `
40124002
<svg
40134003
aria-hidden={true}
40144004
className="slds-button__icon"
4015-
dangerouslySetInnerHTML={
4016-
Object {
4017-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#down\"></use>",
4018-
}
4019-
}
4020-
style={undefined} />
4005+
style={undefined}>
4006+
<use
4007+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#down" />
4008+
</svg>
40214009
</button>
40224010
</div>
40234011
</div>

.storybook/__storyshots__/DateInput.shot

Lines changed: 32 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,10 @@ exports[`Controlled with knobs`] = `
4141
<svg
4242
aria-hidden={true}
4343
className="slds-icon slds-icon-text-default slds-input__icon"
44-
dangerouslySetInnerHTML={
45-
Object {
46-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#event\"></use>",
47-
}
48-
}
49-
style={undefined} />
44+
style={undefined}>
45+
<use
46+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#event" />
47+
</svg>
5048
</span>
5149
</div>
5250
</div>
@@ -736,12 +734,10 @@ exports[`Default`] = `
736734
<svg
737735
aria-hidden={true}
738736
className="slds-icon slds-icon-text-default slds-input__icon"
739-
dangerouslySetInnerHTML={
740-
Object {
741-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#event\"></use>",
742-
}
743-
}
744-
style={undefined} />
737+
style={undefined}>
738+
<use
739+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#event" />
740+
</svg>
745741
</span>
746742
</div>
747743
</div>
@@ -1459,12 +1455,10 @@ exports[`Disabled`] = `
14591455
<svg
14601456
aria-hidden={true}
14611457
className="slds-icon slds-icon-text-default slds-input__icon"
1462-
dangerouslySetInnerHTML={
1463-
Object {
1464-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#event\"></use>",
1465-
}
1466-
}
1467-
style={undefined} />
1458+
style={undefined}>
1459+
<use
1460+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#event" />
1461+
</svg>
14681462
</span>
14691463
</div>
14701464
</div>
@@ -2195,12 +2189,10 @@ exports[`Error`] = `
21952189
<svg
21962190
aria-hidden={true}
21972191
className="slds-icon slds-icon-text-default slds-input__icon"
2198-
dangerouslySetInnerHTML={
2199-
Object {
2200-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#event\"></use>",
2201-
}
2202-
}
2203-
style={undefined} />
2192+
style={undefined}>
2193+
<use
2194+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#event" />
2195+
</svg>
22042196
</span>
22052197
</div>
22062198
</div>
@@ -2958,12 +2950,10 @@ exports[`Include time data`] = `
29582950
<svg
29592951
aria-hidden={true}
29602952
className="slds-icon slds-icon-text-default slds-input__icon"
2961-
dangerouslySetInnerHTML={
2962-
Object {
2963-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#event\"></use>",
2964-
}
2965-
}
2966-
style={undefined} />
2953+
style={undefined}>
2954+
<use
2955+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#event" />
2956+
</svg>
29672957
</span>
29682958
</div>
29692959
</div>
@@ -3721,12 +3711,10 @@ exports[`Required`] = `
37213711
<svg
37223712
aria-hidden={true}
37233713
className="slds-icon slds-icon-text-default slds-input__icon"
3724-
dangerouslySetInnerHTML={
3725-
Object {
3726-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#event\"></use>",
3727-
}
3728-
}
3729-
style={undefined} />
3714+
style={undefined}>
3715+
<use
3716+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#event" />
3717+
</svg>
37303718
</span>
37313719
</div>
37323720
</div>
@@ -4453,12 +4441,10 @@ exports[`With date format`] = `
44534441
<svg
44544442
aria-hidden={true}
44554443
className="slds-icon slds-icon-text-default slds-input__icon"
4456-
dangerouslySetInnerHTML={
4457-
Object {
4458-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#event\"></use>",
4459-
}
4460-
}
4461-
style={undefined} />
4444+
style={undefined}>
4445+
<use
4446+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#event" />
4447+
</svg>
44624448
</span>
44634449
</div>
44644450
</div>
@@ -5202,12 +5188,10 @@ exports[`With min/max date`] = `
52025188
<svg
52035189
aria-hidden={true}
52045190
className="slds-icon slds-icon-text-default slds-input__icon"
5205-
dangerouslySetInnerHTML={
5206-
Object {
5207-
"__html": "<use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#event\"></use>",
5208-
}
5209-
}
5210-
style={undefined} />
5191+
style={undefined}>
5192+
<use
5193+
xlinkHref="/assets/icons/utility-sprite/svg/symbols.svg#event" />
5194+
</svg>
52115195
</span>
52125196
</div>
52135197
</div>

0 commit comments

Comments
 (0)