Skip to content

Commit 83cee35

Browse files
authored
fix: icons for v15 (#2874)
* fix: icons v15 * fix: test * chore: update version of icons * chore: lock * fix: demos
1 parent 651fcc2 commit 83cee35

File tree

79 files changed

+621
-654
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+621
-654
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@
102102
},
103103
"dependencies": {
104104
"@babel/runtime": "^7.23.9",
105-
"@nutui/icons-react": "^2.0.1",
106-
"@nutui/icons-react-taro": "^2.0.1",
105+
"@nutui/icons-react": "^3.0.0-beta.1",
106+
"@nutui/icons-react-taro": "^3.0.1-beta.0",
107107
"@nutui/jdesign-icons-react-taro": "1.0.6-beta.2",
108108
"@nutui/touch-emulator": "^1.0.0",
109109
"@react-spring/web": "~9.6.1",

pnpm-lock.yaml

Lines changed: 339 additions & 245 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

3-
exports[`Address: exist defaultIcon & selectIcon 1`] = `"<div class="nut-overlay" style="--nutui-overlay-zIndex: 1000;"></div><div style="z-index: 1000;" class="nut-popup nut-popup-round nut-popup-bottom"><div class="nut-popup-title"><div class="nut-popup-title-title">请选择地址</div><div class="nut-popup-title-right nut-popup-title-right-top-right"><svg class="nut-icon nut-icon-Close " xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" aria-labelledby="Close" role="presentation"><path d="M865.83 926.17a42.67 42.67 0 1 0 60.36-60.34L572.35 512l353.84-353.83a42.67 42.67 0 0 0-60.36-60.34L512 451.67 158.19 97.83a42.67 42.67 0 0 0-60.36 60.34L451.67 512 97.83 865.83a42.67 42.67 0 1 0 60.34 60.34L512 572.33z" fill="currentColor" fill-opacity="0.9"></path></svg></div></div><div class="nut-address "><ul class="nut-address-exist"><li class="nut-address-exist-item "><div class="default">123</div><div class="nut-address-exist-item-info"><div>探探鱼</div><div>182****1718</div><div>北京市次渠镇通州区</div></div></li><li class="nut-address-exist-item "><div class="default">123</div><div class="nut-address-exist-item-info"><div>探探鱼</div><div>182****1718</div><div>钓鱼岛钓鱼岛全区</div></div></li><li class="nut-address-exist-item active"><div class="select">456</div><div class="nut-address-exist-item-info"><div>探探鱼</div><div>182****1718</div><div>北京市大兴区科创十一街18号院京东大厦</div></div></li></ul></div></div>"`;
3+
exports[`Address: exist defaultIcon & selectIcon 1`] = `"<div class="nut-overlay" style="--nutui-overlay-zIndex: 1000;"></div><div style="z-index: 1000;" class="nut-popup nut-popup-round nut-popup-bottom"><div class="nut-popup-title"><div class="nut-popup-title-title">请选择地址</div><div class="nut-popup-title-right nut-popup-title-right-top-right"><svg class="nut-icon nut-icon-Close " xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" aria-labelledby="Close" role="presentation"><path d="m512 557.23 279.25 279.25c4.27 4.27 10.88 4.27 14.94 0l30.29-30.29c4.27-4.27 4.27-10.88 0-14.94L557.23 512l279.25-279.25c4.27-4.27 4.27-10.88 0-14.94l-30.29-30.29c-4.27-4.27-10.88-4.27-14.94 0L512 466.77 232.75 187.52c-4.27-4.27-10.88-4.27-14.94 0l-30.29 30.29c-4.27 4.27-4.27 10.88 0 14.94L466.77 512 187.52 791.25c-4.27 4.27-4.27 10.88 0 14.94l30.29 30.29c4.27 4.27 10.88 4.27 14.94 0z" fill="currentColor" fill-opacity="0.9"></path></svg></div></div><div class="nut-address "><ul class="nut-address-exist"><li class="nut-address-exist-item "><div class="default">123</div><div class="nut-address-exist-item-info"><div>探探鱼</div><div>182****1718</div><div>北京市次渠镇通州区</div></div></li><li class="nut-address-exist-item "><div class="default">123</div><div class="nut-address-exist-item-info"><div>探探鱼</div><div>182****1718</div><div>钓鱼岛钓鱼岛全区</div></div></li><li class="nut-address-exist-item active"><div class="select">456</div><div class="nut-address-exist-item-info"><div>探探鱼</div><div>182****1718</div><div>北京市大兴区科创十一街18号院京东大厦</div></div></li></ul></div></div>"`;
44

5-
exports[`Address: show custom 1`] = `"<div class="nut-overlay" style="--nutui-overlay-zIndex: 1000;"></div><div style="z-index: 1000;" class="nut-popup nut-popup-round nut-popup-bottom"><div class="nut-popup-title"><div class="nut-popup-title-left"></div><div class="nut-popup-title-title">选择地址</div><div class="nut-popup-title-right nut-popup-title-right-top-right"><svg class="nut-icon nut-icon-Close " xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" aria-labelledby="Close" role="presentation"><path d="M865.83 926.17a42.67 42.67 0 1 0 60.36-60.34L572.35 512l353.84-353.83a42.67 42.67 0 0 0-60.36-60.34L512 451.67 158.19 97.83a42.67 42.67 0 0 0-60.36 60.34L451.67 512 97.83 865.83a42.67 42.67 0 1 0 60.34 60.34L512 572.33z" fill="currentColor" fill-opacity="0.9"></path></svg></div></div><div class="nut-cascader "><div class="nut-tabs nut-tabs-horizontal"><div class="nut-tabs-titles nut-tabs-titles-line nut-tabs-titles-scrollable"><div class="nut-tabs-titles-item nut-tabs-titles-item-active"><span class="nut-tabs-titles-item-text">请选择</span><span class="nut-tabs-titles-item-line"></span></div></div><div class="nut-tabs-content-wrap"><div class="nut-tabs-content" style="transform: translate3d(-0%, 0, 0); transition-duration: 300ms;"><div class="nut-tabpane active"><div class="nut-cascader-pane"><div class="nut-cascader-item"><div class="nut-cascader-item-title">浙江</div></div><div class="disabled nut-cascader-item"><div class="nut-cascader-item-title">湖南</div></div><div class="nut-cascader-item"><div class="nut-cascader-item-title">福建</div></div></div></div></div></div></div></div></div>"`;
5+
exports[`Address: show custom 1`] = `"<div class="nut-overlay" style="--nutui-overlay-zIndex: 1000;"></div><div style="z-index: 1000;" class="nut-popup nut-popup-round nut-popup-bottom"><div class="nut-popup-title"><div class="nut-popup-title-left"></div><div class="nut-popup-title-title">选择地址</div><div class="nut-popup-title-right nut-popup-title-right-top-right"><svg class="nut-icon nut-icon-Close " xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" aria-labelledby="Close" role="presentation"><path d="m512 557.23 279.25 279.25c4.27 4.27 10.88 4.27 14.94 0l30.29-30.29c4.27-4.27 4.27-10.88 0-14.94L557.23 512l279.25-279.25c4.27-4.27 4.27-10.88 0-14.94l-30.29-30.29c-4.27-4.27-10.88-4.27-14.94 0L512 466.77 232.75 187.52c-4.27-4.27-10.88-4.27-14.94 0l-30.29 30.29c-4.27 4.27-4.27 10.88 0 14.94L466.77 512 187.52 791.25c-4.27 4.27-4.27 10.88 0 14.94l30.29 30.29c4.27 4.27 10.88 4.27 14.94 0z" fill="currentColor" fill-opacity="0.9"></path></svg></div></div><div class="nut-cascader "><div class="nut-tabs nut-tabs-horizontal"><div class="nut-tabs-titles nut-tabs-titles-line nut-tabs-titles-scrollable"><div class="nut-tabs-titles-item nut-tabs-titles-item-active"><span class="nut-tabs-titles-item-text">请选择</span><span class="nut-tabs-titles-item-line"></span></div></div><div class="nut-tabs-content-wrap"><div class="nut-tabs-content" style="transform: translate3d(-0%, 0, 0); transition-duration: 300ms;"><div class="nut-tabpane active"><div class="nut-cascader-pane"><div class="nut-cascader-item"><div class="nut-cascader-item-title">浙江</div></div><div class="disabled nut-cascader-item"><div class="nut-cascader-item-title">湖南</div></div><div class="nut-cascader-item"><div class="nut-cascader-item-title">福建</div></div></div></div></div></div></div></div></div>"`;
66

7-
exports[`Address: show exist 1`] = `"<div class="nut-overlay" style="--nutui-overlay-zIndex: 1000;"></div><div style="z-index: 1000;" class="nut-popup nut-popup-round nut-popup-bottom"><div class="nut-popup-title"><div class="nut-popup-title-title">选择地址</div><div class="nut-popup-title-right nut-popup-title-right-top-right"><svg class="nut-icon nut-icon-Close " xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" aria-labelledby="Close" role="presentation"><path d="M865.83 926.17a42.67 42.67 0 1 0 60.36-60.34L572.35 512l353.84-353.83a42.67 42.67 0 0 0-60.36-60.34L512 451.67 158.19 97.83a42.67 42.67 0 0 0-60.36 60.34L451.67 512 97.83 865.83a42.67 42.67 0 1 0 60.34 60.34L512 572.33z" fill="currentColor" fill-opacity="0.9"></path></svg></div></div><div class="nut-address "><ul class="nut-address-exist"><li class="nut-address-exist-item active"><svg class="nut-icon nut-icon-Check " style="color: var(--nutui-color-primary);" xmlns="http://www.w3.org/2000/svg" color="var(--nutui-color-primary)" viewBox="0 0 1024 1024" aria-labelledby="Check" role="presentation"><path d="M998.4 245.03c-219.43 153.6-398.63 332.8-552.23 552.23-40.23 58.51-128 54.86-164.57-3.66-69.49-106.06-149.94-186.51-256-256-51.2-32.91-18.29-113.37 40.23-98.74 117.03 21.94 208.46 69.49 292.57 146.28 157.26-190.17 358.4-340.11 588.8-435.2 62.17-25.6 106.06 58.51 51.2 95.09" fill="currentColor" fill-opacity="0.9"></path></svg><div class="nut-address-exist-item-info"><div>探探鱼</div><div>182****1718</div><div>北京市次渠镇通州区</div></div></li><li class="nut-address-exist-item "><svg class="nut-icon nut-icon-Location " xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" aria-labelledby="Location" role="presentation"><path d="M682.67 470.04c0 94.4-76.42 170.94-170.67 170.94s-170.67-76.54-170.67-170.94S417.75 299.12 512 299.11s170.67 76.52 170.67 170.93m-85.34 0A85.4 85.4 0 0 0 512 384.58c-47.15 0-85.33 38.27-85.33 85.46A85.4 85.4 0 0 0 512 555.5c47.15 0 85.33-38.25 85.33-85.46" fill="currentColor" fill-opacity="0.9"></path>,<path d="M981.33 470.04c0 277.76-312.75 465.73-464.15 552.53a10.22 10.22 0 0 1-10.36 0C355.42 935.79 42.67 747.82 42.67 470.06 42.67 210.45 252.8 0 512 0s469.33 210.45 469.33 470.04m-85.33 0c0-212.39-171.93-384.58-384-384.58S128 257.64 128 470.04c0 106.24 60.52 202.73 151.85 288.85 74.6 70.4 161.98 126.46 232.15 167.89 70.19-41.43 157.55-97.49 232.15-167.89C835.46 672.77 896 576.28 896 470.04" fill="currentColor" fill-opacity="0.9"></path></svg><div class="nut-address-exist-item-info"><div>探探鱼</div><div>182****1718</div><div>钓鱼岛钓鱼岛全区</div></div></li><li class="nut-address-exist-item "><svg class="nut-icon nut-icon-Location " xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" aria-labelledby="Location" role="presentation"><path d="M682.67 470.04c0 94.4-76.42 170.94-170.67 170.94s-170.67-76.54-170.67-170.94S417.75 299.12 512 299.11s170.67 76.52 170.67 170.93m-85.34 0A85.4 85.4 0 0 0 512 384.58c-47.15 0-85.33 38.27-85.33 85.46A85.4 85.4 0 0 0 512 555.5c47.15 0 85.33-38.25 85.33-85.46" fill="currentColor" fill-opacity="0.9"></path>,<path d="M981.33 470.04c0 277.76-312.75 465.73-464.15 552.53a10.22 10.22 0 0 1-10.36 0C355.42 935.79 42.67 747.82 42.67 470.06 42.67 210.45 252.8 0 512 0s469.33 210.45 469.33 470.04m-85.33 0c0-212.39-171.93-384.58-384-384.58S128 257.64 128 470.04c0 106.24 60.52 202.73 151.85 288.85 74.6 70.4 161.98 126.46 232.15 167.89 70.19-41.43 157.55-97.49 232.15-167.89C835.46 672.77 896 576.28 896 470.04" fill="currentColor" fill-opacity="0.9"></path></svg><div class="nut-address-exist-item-info"><div>探探鱼</div><div>182****1718</div><div>北京市大兴区科创十一街18号院京东大厦</div></div></li></ul></div></div>"`;
7+
exports[`Address: show exist 1`] = `"<div class="nut-overlay" style="--nutui-overlay-zIndex: 1000;"></div><div style="z-index: 1000;" class="nut-popup nut-popup-round nut-popup-bottom"><div class="nut-popup-title"><div class="nut-popup-title-title">选择地址</div><div class="nut-popup-title-right nut-popup-title-right-top-right"><svg class="nut-icon nut-icon-Close " xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" aria-labelledby="Close" role="presentation"><path d="m512 557.23 279.25 279.25c4.27 4.27 10.88 4.27 14.94 0l30.29-30.29c4.27-4.27 4.27-10.88 0-14.94L557.23 512l279.25-279.25c4.27-4.27 4.27-10.88 0-14.94l-30.29-30.29c-4.27-4.27-10.88-4.27-14.94 0L512 466.77 232.75 187.52c-4.27-4.27-10.88-4.27-14.94 0l-30.29 30.29c-4.27 4.27-4.27 10.88 0 14.94L466.77 512 187.52 791.25c-4.27 4.27-4.27 10.88 0 14.94l30.29 30.29c4.27 4.27 10.88 4.27 14.94 0z" fill="currentColor" fill-opacity="0.9"></path></svg></div></div><div class="nut-address "><ul class="nut-address-exist"><li class="nut-address-exist-item active"><svg class="nut-icon nut-icon-Check " style="color: var(--nutui-color-primary);" xmlns="http://www.w3.org/2000/svg" color="var(--nutui-color-primary)" viewBox="0 0 49 48" aria-labelledby="Check" role="presentation"><path d="M45.121 16.121 47.243 14 43 9.757l-2.121 2.122L19 33.757 7.121 21.88 5 19.757.757 24l2.122 2.121L14.757 38l2.122 2.121L19 42.243l2.121-2.122L23.243 38z" fill="currentColor" fill-opacity="0.9"></path></svg><div class="nut-address-exist-item-info"><div>探探鱼</div><div>182****1718</div><div>北京市次渠镇通州区</div></div></li><li class="nut-address-exist-item "><svg class="nut-icon nut-icon-Location " xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" aria-labelledby="Location" role="presentation"><path d="M533.33 1024s448-232.53 448-576c0-247.47-200.53-448-448-448s-448 200.53-448 448c0 343.47 448 576 448 576m181.12-206.72c-52.91 47.57-105.81 85.33-145.92 111.36a893 893 0 0 1-35.2 21.76 1148.8 1148.8 0 0 1-181.12-133.12C244.05 719.79 149.33 591.79 149.33 448c0-212.05 171.95-384 384-384s384 171.95 384 384c0 143.79-94.72 271.79-202.88 369.28M533.33 640a192 192 0 1 0-.02-384.02 192 192 0 0 0 .02 384.02m0-64c-70.61 0-128-57.39-128-128s57.39-128 128-128 128 57.39 128 128-57.39 128-128 128" fill="currentColor" fill-opacity="0.9"></path></svg><div class="nut-address-exist-item-info"><div>探探鱼</div><div>182****1718</div><div>钓鱼岛钓鱼岛全区</div></div></li><li class="nut-address-exist-item "><svg class="nut-icon nut-icon-Location " xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" aria-labelledby="Location" role="presentation"><path d="M533.33 1024s448-232.53 448-576c0-247.47-200.53-448-448-448s-448 200.53-448 448c0 343.47 448 576 448 576m181.12-206.72c-52.91 47.57-105.81 85.33-145.92 111.36a893 893 0 0 1-35.2 21.76 1148.8 1148.8 0 0 1-181.12-133.12C244.05 719.79 149.33 591.79 149.33 448c0-212.05 171.95-384 384-384s384 171.95 384 384c0 143.79-94.72 271.79-202.88 369.28M533.33 640a192 192 0 1 0-.02-384.02 192 192 0 0 0 .02 384.02m0-64c-70.61 0-128-57.39-128-128s57.39-128 128-128 128 57.39 128 128-57.39 128-128 128" fill="currentColor" fill-opacity="0.9"></path></svg><div class="nut-address-exist-item-info"><div>探探鱼</div><div>182****1718</div><div>北京市大兴区科创十一街18号院京东大厦</div></div></li></ul></div></div>"`;

src/packages/audio/__test__/__snapshots__/audio.spec.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ exports[`icon type test 1`] = `
1515
aria-labelledby="Service"
1616
class="nut-icon nut-icon-Service "
1717
role="presentation"
18-
viewBox="0 0 1024 1024"
18+
viewBox="0 0 48 48"
1919
xmlns="http://www.w3.org/2000/svg"
2020
>
2121
<path
22-
d="M1024 657.72H905.85V531.69c0-228.43-177.23-413.54-393.85-413.54S118.15 303.26 118.15 531.69v126.03H0V531.69C0 236.3 228.43 0 512 0s512 236.31 512 531.69zM196.92 866.46C86.64 866.46 0 779.81 0 669.54s86.65-196.92 196.92-196.93 196.92 86.65 196.93 196.93-86.65 196.92-196.93 196.92m0-275.69c-43.32 0-78.77 35.45-78.77 78.77s35.45 78.77 78.77 78.77 78.77-35.45 78.77-78.77-35.45-78.77-78.77-78.77m630.16 275.69c-110.28 0-196.92-86.65-196.93-196.92s86.65-196.92 196.93-196.93S1024 559.26 1024 669.54s-86.65 196.92-196.92 196.92m0-275.69c-43.32 0-78.77 35.45-78.77 78.77s35.45 78.77 78.77 78.77 78.77-35.45 78.77-78.77-35.45-78.77-78.77-78.77m-149.66 429.29c-23.63 0-47.26-15.75-55.14-43.32-7.88-31.51 7.88-63.02 39.38-74.83 102.4-31.51 189.05-102.4 236.31-196.93 15.75-27.57 51.2-39.38 78.77-23.63s39.38 51.2 23.63 78.77c-63.02 122.09-177.23 216.61-307.2 256-3.94 3.94-11.81 3.94-15.75 3.94"
22+
d="M2 20h1.006C3.278 8.875 12.609 0 24 0s20.722 8.875 20.994 20H46a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-.508c-.269 7.663-6.658 13.743-14.49 13.992a.49.49 0 0 1-.502-.492v-2c0-.276.224-.499.5-.51 6.27-.245 11.223-5.075 11.49-10.99H41a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h.993C41.721 10.6 33.805 3 24 3S6.279 10.6 6.007 20H7a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2m1 3v6h3v-6zm39 6h3v-6h-3zm-13.063-.858a.53.53 0 0 1 .72.011l1.413 1.415a.483.483 0 0 1-.007.698c-3.998 3.64-10.127 3.64-14.126 0a.483.483 0 0 1-.009-.698l1.415-1.415a.527.527 0 0 1 .718-.011 7.5 7.5 0 0 0 9.876 0"
2323
fill="currentColor"
2424
fill-opacity="0.9"
2525
/>

src/packages/audio/demos/h5/demo3.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import React, { useState } from 'react'
22
import { Audio } from '@nutui/nutui-react'
3-
import { PlayCircleFill, PoweroffCircleFill } from '@nutui/icons-react'
3+
import { PlayStart, PlayStop } from '@nutui/icons-react'
44

55
const Demo3 = () => {
66
const [duration, setDuration] = useState(0)
7-
const [voiceIcon, setVoiceIcon] = useState<any>(<PlayCircleFill />)
7+
const [voiceIcon, setVoiceIcon] = useState<any>(<PlayStart />)
88
const audioElement = document.querySelectorAll('audio')[2]
99
if (audioElement) {
1010
audioElement.addEventListener('playing', (e) => {
11-
setVoiceIcon(<PoweroffCircleFill />)
11+
setVoiceIcon(<PlayStop />)
1212
})
1313
audioElement.addEventListener('pause', (e) => {
14-
setVoiceIcon(<PlayCircleFill />)
14+
setVoiceIcon(<PlayStart />)
1515
})
1616
}
1717
return (

src/packages/avatar/demo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const AvatarDemo = () => {
5151

5252
return (
5353
<>
54-
<div className="demo full avatar-demo">
54+
<div className="demo avatar-demo">
5555
<h2>{translated['67f78db5']}</h2>
5656
<Demo1 />
5757

src/packages/avatarcropper/demo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const AvatarCropperDemo = () => {
2424
})
2525
return (
2626
<>
27-
<div className="demo full">
27+
<div className="demo">
2828
<h2>{translated.basic}</h2>
2929
<Demo1 />
3030

src/packages/backtop/__test__/__snapshots__/backtop.spec.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ exports[`backtop custom test 1`] = `
1616
aria-labelledby="Top"
1717
class="nut-icon nut-icon-Top "
1818
role="presentation"
19-
viewBox="0 0 1024 1024"
19+
viewBox="0 0 44 44"
2020
xmlns="http://www.w3.org/2000/svg"
2121
>
2222
<path
23-
d="M128 0a42.67 42.67 0 1 0 0 85.33h768A42.67 42.67 0 1 0 896 0zm391.21 173.42a10.88 10.88 0 0 0-14.42 0L3.61 619.67a10.71 10.71 0 0 0 7.21 18.67h241.34v257.11c0 71 58.05 128.55 129.64 128.55h260.4c71.59 0 129.64-57.56 129.64-128.55V638.34h241.34a10.71 10.71 0 0 0 7.21-18.67zM338.6 895.45V552.64H208.21L512 282.15l303.77 270.49H685.42v342.83c0 23.64-19.37 42.84-43.22 42.83H381.8c-23.85 0-43.2-19.2-43.2-42.85"
23+
d="M43.042 18.666a.6.6 0 0 1 .062.846l-1.506 1.743a.6.6 0 0 1-.846.062L23.753 6.64V42.9a.6.6 0 0 1-.6.599H20.85a.6.6 0 0 1-.6-.6V6.64L3.25 21.318a.6.6 0 0 1-.846-.062L.898 19.512a.6.6 0 0 1 .062-.846L22.001.5z"
2424
fill="currentColor"
2525
fill-opacity="0.9"
2626
/>

src/packages/badge/__test__/__snapshots__/badge.spec.tsx.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ exports[`should match custom icon 1`] = `
1010
style="top: 0px; right: 0px;"
1111
>
1212
<svg
13-
aria-labelledby="Checklist"
14-
class="nut-icon nut-icon-Checklist "
13+
aria-labelledby="Check"
14+
class="nut-icon nut-icon-Check "
1515
role="presentation"
16-
viewBox="0 0 1024 1024"
16+
viewBox="0 0 49 48"
1717
xmlns="http://www.w3.org/2000/svg"
1818
>
1919
<path
20-
d="M159.29 500.62c62.58 0 125.16 17.07 221.87 102.4 8.53 5.69 19.91 5.69 25.6 0 48.35-54.04 238.93-261.69 455.11-329.95 0 0 28.45-5.69 42.66 19.91 8.53 17.07 19.91 34.13-5.69 54.04-22.75 17.07-264.53 179.2-440.88 440.89l-2.85 2.85c-11.38 8.53-68.27 51.2-119.47-14.23-56.89-71.11-85.33-139.38-196.26-196.26-2.85 0-2.85-2.85-5.69-5.69-11.38-11.38-54.04-73.95 25.6-73.96"
20+
d="M45.121 16.121 47.243 14 43 9.757l-2.121 2.122L19 33.757 7.121 21.88 5 19.757.757 24l2.122 2.121L14.757 38l2.122 2.121L19 42.243l2.121-2.122L23.243 38z"
2121
fill="currentColor"
2222
fill-opacity="0.9"
2323
/>

src/packages/badge/__test__/badge.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react'
22
import { render } from '@testing-library/react'
33
import '@testing-library/jest-dom'
44

5-
import { Checklist } from '@nutui/icons-react'
5+
import { Check } from '@nutui/icons-react'
66
import { Badge } from '../badge'
77

88
test('should match snapshot', () => {
@@ -41,6 +41,6 @@ test('should match top、right: float', () => {
4141
})
4242

4343
test('should match custom icon', () => {
44-
const { asFragment } = render(<Badge value={<Checklist />} />)
44+
const { asFragment } = render(<Badge value={<Check />} />)
4545
expect(asFragment()).toMatchSnapshot()
4646
})

0 commit comments

Comments
 (0)