Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(Dialog): fix dialog position demo #3005

Merged
merged 3 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading