diff --git a/src/avatar/__tests__/__snapshots__/avatar.test.tsx.snap b/src/avatar/__tests__/__snapshots__/avatar.test.tsx.snap index 047df30d2..7da9bbbfd 100644 --- a/src/avatar/__tests__/__snapshots__/avatar.test.tsx.snap +++ b/src/avatar/__tests__/__snapshots__/avatar.test.tsx.snap @@ -3,37 +3,50 @@ exports[`adjust.jsx 1`] = `
- - 王 - + + 王 + +
- - 王亿 - + + 王亿 + +
- - 王亿亿 - + + 王亿亿 + +
@@ -42,50 +55,41 @@ exports[`adjust.jsx 1`] = ` exports[`base.jsx 1`] = `
- -
-
- - W - + +
- - - + + W + +
- - +
+ +
+
+ + + + + +
@@ -109,11 +139,11 @@ exports[`base.jsx 1`] = ` exports[`group.jsx 1`] = `
- - W - -
-
- - W - -
-
- -`; - -exports[`size.jsx 1`] = ` - -
-
+
+
+
+
+
+`; + +exports[`size.jsx 1`] = ` + +
+
- - W - -
-
- + + W + +
+
+
- W - +
+ + W + +
+
+
+
+ + W + +
+
+
+
+ + W + +
+
- - W - -
-
- + + W + +
+
+
- W - -
-
- + + W + +
+
+
- W - -
-
- + + W + +
+
+
- W - +
+ + W + +
+
diff --git a/src/avatar/_example/adjust.jsx b/src/avatar/_example/adjust.jsx index c17b71710..14c1c6fae 100644 --- a/src/avatar/_example/adjust.jsx +++ b/src/avatar/_example/adjust.jsx @@ -1,12 +1,12 @@ import React from 'react'; -import { Avatar } from 'tdesign-react'; +import { Avatar, Space } from 'tdesign-react'; export default function AdjustAvatar() { return ( -
+ 王亿 王亿亿 -
+ ); } diff --git a/src/avatar/_example/base.jsx b/src/avatar/_example/base.jsx index bbebc58e8..43b44dd46 100644 --- a/src/avatar/_example/base.jsx +++ b/src/avatar/_example/base.jsx @@ -1,10 +1,10 @@ import React from 'react'; -import { Avatar } from 'tdesign-react'; +import { Avatar, Space } from 'tdesign-react'; import { UserIcon } from 'tdesign-icons-react'; export default function BasicAvatar() { return ( -
+ -
+ ); } diff --git a/src/avatar/_example/group-cascading.jsx b/src/avatar/_example/group-cascading.jsx index 049d7f7d5..f19abbb08 100644 --- a/src/avatar/_example/group-cascading.jsx +++ b/src/avatar/_example/group-cascading.jsx @@ -1,26 +1,23 @@ import React from 'react'; -import { Avatar } from 'tdesign-react'; +import { Avatar, Space } from 'tdesign-react'; import { UserIcon } from 'tdesign-icons-react'; const { Group: AvatarGroup } = Avatar; export default function GroupCascadingAvatar() { return ( -
-
- - - W - }> - -
-
- - - W - }> - -
-
+ + + + W + }> + + + + + W + }> + + ); } diff --git a/src/avatar/_example/group-max.jsx b/src/avatar/_example/group-max.jsx index 8450c4113..e59c21fe7 100644 --- a/src/avatar/_example/group-max.jsx +++ b/src/avatar/_example/group-max.jsx @@ -1,33 +1,29 @@ import React from 'react'; -import { Avatar } from 'tdesign-react'; +import { Avatar, Space } from 'tdesign-react'; import { UserIcon, EllipsisIcon } from 'tdesign-icons-react'; const { Group: AvatarGroup } = Avatar; export default function GroupMaxAvatar() { return ( -
-
- - - Avatar - - -
-
- }> - - Avatar - }> - -
-
- - - Avatar - }> - -
-
+ + + + Avatar + + + + }> + + Avatar + }> + + + + + Avatar + }> + + ); } diff --git a/src/avatar/_example/group.jsx b/src/avatar/_example/group.jsx index cc6401e26..654beaf40 100644 --- a/src/avatar/_example/group.jsx +++ b/src/avatar/_example/group.jsx @@ -1,26 +1,23 @@ import React from 'react'; -import { Avatar } from 'tdesign-react'; +import { Avatar, Space } from 'tdesign-react'; import { UserIcon } from 'tdesign-icons-react'; const { Group: AvatarGroup } = Avatar; export default function GroupAvatar() { return ( -
-
- - - W - }> - -
-
- - - W - }> - -
-
+ + + + W + }> + + + + + W + }> + + ); } diff --git a/src/avatar/_example/shape.jsx b/src/avatar/_example/shape.jsx index 11e08ea16..973c34222 100644 --- a/src/avatar/_example/shape.jsx +++ b/src/avatar/_example/shape.jsx @@ -1,13 +1,13 @@ import React from 'react'; -import { Avatar } from 'tdesign-react'; +import { Avatar, Space } from 'tdesign-react'; export default function ShapeAvatar() { return ( -
+ W W -
+ ); } diff --git a/src/avatar/_example/size.jsx b/src/avatar/_example/size.jsx index 0fb95ac6e..e1003cf2b 100644 --- a/src/avatar/_example/size.jsx +++ b/src/avatar/_example/size.jsx @@ -1,10 +1,10 @@ import React from 'react'; -import { Avatar } from 'tdesign-react'; +import { Avatar, Space } from 'tdesign-react'; export default function SizeAvatar() { return ( -
-
+ + W @@ -17,8 +17,8 @@ export default function SizeAvatar() { W -
-
+ + W @@ -31,7 +31,7 @@ export default function SizeAvatar() { W -
-
+ + ); } diff --git a/test/ssr/__snapshots__/ssr.test.js.snap b/test/ssr/__snapshots__/ssr.test.js.snap index f03dfd376..67afdbe6a 100644 --- a/test/ssr/__snapshots__/ssr.test.js.snap +++ b/test/ssr/__snapshots__/ssr.test.js.snap @@ -32,19 +32,19 @@ exports[`ssr snapshot test renders ./src/anchor/_example/small.jsx correctly 1`] exports[`ssr snapshot test renders ./src/anchor/_example/target.jsx correctly 1`] = `"

基础锚点

多级锚点

尺寸大小

指定容器

"`; -exports[`ssr snapshot test renders ./src/avatar/_example/adjust.jsx correctly 1`] = `"
王亿
王亿亿
"`; +exports[`ssr snapshot test renders ./src/avatar/_example/adjust.jsx correctly 1`] = `"
王亿
王亿亿
"`; -exports[`ssr snapshot test renders ./src/avatar/_example/base.jsx correctly 1`] = `"
W
"`; +exports[`ssr snapshot test renders ./src/avatar/_example/base.jsx correctly 1`] = `"
W
"`; -exports[`ssr snapshot test renders ./src/avatar/_example/group.jsx correctly 1`] = `"
W
W
"`; +exports[`ssr snapshot test renders ./src/avatar/_example/group.jsx correctly 1`] = `"
W
W
"`; -exports[`ssr snapshot test renders ./src/avatar/_example/group-cascading.jsx correctly 1`] = `"
W
W
"`; +exports[`ssr snapshot test renders ./src/avatar/_example/group-cascading.jsx correctly 1`] = `"
W
W
"`; -exports[`ssr snapshot test renders ./src/avatar/_example/group-max.jsx correctly 1`] = `"
Avatar
+1
Avatar
Avatar
more
"`; +exports[`ssr snapshot test renders ./src/avatar/_example/group-max.jsx correctly 1`] = `"
Avatar
+1
Avatar
Avatar
more
"`; -exports[`ssr snapshot test renders ./src/avatar/_example/shape.jsx correctly 1`] = `"
W
W
"`; +exports[`ssr snapshot test renders ./src/avatar/_example/shape.jsx correctly 1`] = `"
W
W
"`; -exports[`ssr snapshot test renders ./src/avatar/_example/size.jsx correctly 1`] = `"
W
W
W
W
W
W
W
W
"`; +exports[`ssr snapshot test renders ./src/avatar/_example/size.jsx correctly 1`] = `"
W
W
W
W
W
W
W
W
"`; exports[`ssr snapshot test renders ./src/badge/_example/base.jsx correctly 1`] = `"解锁新徽章"`;