Skip to content

Commit

Permalink
docs(Dialog): fix dialog position demo (#3005)
Browse files Browse the repository at this point in the history
* docs: ✏️ 更新dialog位置示例

* test: 💍 update snapshot

* test: 💍 update snapshot
  • Loading branch information
novlan1 authored Jul 24, 2024
1 parent 8ff93d2 commit 767deb0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/dialog/_example/position.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ export default function PositionExample() {
};
return (
<>
<Button theme="primary" onClick={() => handleClick('center')} style={{ marginRight: 16 }}>
<Button theme="primary" onClick={() => handleClick('top')} style={{ marginRight: 16 }}>
默认
</Button>
<Button theme="primary" onClick={() => handleClick('top')} style={{ marginRight: 16 }}>
顶部
<Button theme="primary" onClick={() => handleClick('center')} style={{ marginRight: 16 }}>
垂直居中
</Button>
<Button
theme="primary"
Expand Down
6 changes: 3 additions & 3 deletions test/snap/__snapshots__/csr.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -87434,7 +87434,7 @@ exports[`csr snapshot test > csr test src/dialog/_example/position.tsx 1`] = `
<span
class="t-button__text"
>
顶部
垂直居中
</span>
</button>
<button
Expand Down Expand Up @@ -87480,7 +87480,7 @@ exports[`csr snapshot test > csr test src/dialog/_example/position.tsx 1`] = `
<span
class="t-button__text"
>
顶部
垂直居中
</span>
</button>
<button
Expand Down Expand Up @@ -306377,7 +306377,7 @@ exports[`ssr snapshot test > ssr test src/dialog/_example/modal.tsx 1`] = `"<but

exports[`ssr snapshot test > ssr test src/dialog/_example/plugin.tsx 1`] = `"<div style=\\"gap:16px\\" class=\\"t-space t-space-vertical\\"><div class=\\"t-space-item\\"><p>函数调用方式一:DialogPlugin(options)</p></div><div class=\\"t-space-item\\"><p>函数调用方式二:DialogPlugin.confirm(options)</p></div><div class=\\"t-space-item\\"><p>函数调用方式三:DialogPlugin.alert(options)</p></div><div class=\\"t-space-item\\"><div><button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">dialog</span></button><button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">handleDialogNode</span></button><button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">confirm</span></button><button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">alert</span></button><button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">DialogPlugin.confirm</span></button></div></div></div>"`;

exports[`ssr snapshot test > ssr test src/dialog/_example/position.tsx 1`] = `"<button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">默认</span></button><button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">顶部</span></button><button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">自定义</span></button><button type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">超出屏幕</span></button>"`;
exports[`ssr snapshot test > ssr test src/dialog/_example/position.tsx 1`] = `"<button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">默认</span></button><button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">垂直居中</span></button><button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">自定义</span></button><button type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">超出屏幕</span></button>"`;

exports[`ssr snapshot test > ssr test src/dialog/_example/warning.tsx 1`] = `"<div style=\\"gap:16px\\" class=\\"t-space t-space-horizontal t-space--break-line\\"><div class=\\"t-space-item\\"><button type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">提示反馈</span></button></div><div class=\\"t-space-item\\"><button type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">成功反馈</span></button></div><div class=\\"t-space-item\\"><button type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">警示反馈</span></button></div><div class=\\"t-space-item\\"><button type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">错误反馈</span></button></div><div class=\\"t-space-item\\"></div><div class=\\"t-space-item\\"></div><div class=\\"t-space-item\\"></div><div class=\\"t-space-item\\"></div></div>"`;

Expand Down
2 changes: 1 addition & 1 deletion test/snap/__snapshots__/ssr.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ exports[`ssr snapshot test > ssr test src/dialog/_example/modal.tsx 1`] = `"<but

exports[`ssr snapshot test > ssr test src/dialog/_example/plugin.tsx 1`] = `"<div style=\\"gap:16px\\" class=\\"t-space t-space-vertical\\"><div class=\\"t-space-item\\"><p>函数调用方式一:DialogPlugin(options)</p></div><div class=\\"t-space-item\\"><p>函数调用方式二:DialogPlugin.confirm(options)</p></div><div class=\\"t-space-item\\"><p>函数调用方式三:DialogPlugin.alert(options)</p></div><div class=\\"t-space-item\\"><div><button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">dialog</span></button><button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">handleDialogNode</span></button><button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">confirm</span></button><button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">alert</span></button><button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">DialogPlugin.confirm</span></button></div></div></div>"`;

exports[`ssr snapshot test > ssr test src/dialog/_example/position.tsx 1`] = `"<button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">默认</span></button><button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">顶部</span></button><button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">自定义</span></button><button type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">超出屏幕</span></button>"`;
exports[`ssr snapshot test > ssr test src/dialog/_example/position.tsx 1`] = `"<button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">默认</span></button><button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">垂直居中</span></button><button style=\\"margin-right:16px\\" type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">自定义</span></button><button type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">超出屏幕</span></button>"`;

exports[`ssr snapshot test > ssr test src/dialog/_example/warning.tsx 1`] = `"<div style=\\"gap:16px\\" class=\\"t-space t-space-horizontal t-space--break-line\\"><div class=\\"t-space-item\\"><button type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">提示反馈</span></button></div><div class=\\"t-space-item\\"><button type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">成功反馈</span></button></div><div class=\\"t-space-item\\"><button type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">警示反馈</span></button></div><div class=\\"t-space-item\\"><button type=\\"button\\" class=\\"t-button t-button--theme-primary t-button--variant-base\\"><span class=\\"t-button__text\\">错误反馈</span></button></div><div class=\\"t-space-item\\"></div><div class=\\"t-space-item\\"></div><div class=\\"t-space-item\\"></div><div class=\\"t-space-item\\"></div></div>"`;

Expand Down

0 comments on commit 767deb0

Please sign in to comment.