Skip to content

Commit fc21113

Browse files
authored
fix: fix demo (#634)
1 parent f61895a commit fc21113

File tree

12 files changed

+84
-95
lines changed

12 files changed

+84
-95
lines changed

src/action-sheet/_example/align.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ export default function ListExample() {
88
return (
99
<div className="action-sheet-demo">
1010
<div className="action-sheet-demo-btns">
11-
<Button block variant="outline" theme="primary" onClick={() => setAlignCenterVisible(true)}>
11+
<Button block size="large" variant="outline" theme="primary" onClick={() => setAlignCenterVisible(true)}>
1212
居中列表型
1313
</Button>
14-
<Button block variant="outline" theme="primary" onClick={() => setAlignLeftVisible(true)}>
14+
<Button block size="large" variant="outline" theme="primary" onClick={() => setAlignLeftVisible(true)}>
1515
左对齐列表型
1616
</Button>
1717
</div>

src/action-sheet/_example/grid-multiple.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function GridMultipleExample() {
88
return (
99
<div className="action-sheet-demo">
1010
<div className="action-sheet-demo-btns">
11-
<Button block variant="outline" theme="primary" onClick={() => setMultiPageVisible(true)}>
11+
<Button block size="large" variant="outline" theme="primary" onClick={() => setMultiPageVisible(true)}>
1212
宫格型-多页
1313
</Button>
1414
</div>

src/action-sheet/_example/grid.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ export default function GridExample() {
1010
return (
1111
<div className="action-sheet-demo">
1212
<div className="action-sheet-demo-btns">
13-
<Button block variant="outline" theme="primary" onClick={() => setNormalVisible(true)}>
13+
<Button block size="large" variant="outline" theme="primary" onClick={() => setNormalVisible(true)}>
1414
常规宫格型
1515
</Button>
16-
<Button block variant="outline" theme="primary" onClick={() => setDescVisible(true)}>
16+
<Button block size="large" variant="outline" theme="primary" onClick={() => setDescVisible(true)}>
1717
带描述宫格型
1818
</Button>
19-
<Button block variant="outline" theme="primary" onClick={() => setBadgeVisible(true)}>
19+
<Button block size="large" variant="outline" theme="primary" onClick={() => setBadgeVisible(true)}>
2020
带徽标宫格型
2121
</Button>
2222
</div>

src/action-sheet/_example/list.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ export default function ListExample() {
2626
return (
2727
<div className="action-sheet-demo">
2828
<div className="action-sheet-demo-btns">
29-
<Button block variant="outline" theme="primary" onClick={() => setNormalVisible(true)}>
29+
<Button block size="large" variant="outline" theme="primary" onClick={() => setNormalVisible(true)}>
3030
常规列表型
3131
</Button>
32-
<Button block variant="outline" theme="primary" onClick={() => openByMethod()}>
32+
<Button block size="large" variant="outline" theme="primary" onClick={() => openByMethod()}>
3333
函数调用
3434
</Button>
35-
<Button block variant="outline" theme="primary" onClick={() => setDescVisible(true)}>
35+
<Button block size="large" variant="outline" theme="primary" onClick={() => setDescVisible(true)}>
3636
带描述列表型
3737
</Button>
38-
<Button block variant="outline" theme="primary" onClick={() => setIconVisible(true)}>
38+
<Button block size="large" variant="outline" theme="primary" onClick={() => setIconVisible(true)}>
3939
带图标列表型
4040
</Button>
41-
<Button block variant="outline" theme="primary" onClick={() => setBadgeVisible(true)}>
41+
<Button block size="large" variant="outline" theme="primary" onClick={() => setBadgeVisible(true)}>
4242
带徽标列表型
4343
</Button>
4444
</div>

src/action-sheet/_example/status.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function ListExample() {
88
return (
99
<div className="action-sheet-demo">
1010
<div className="action-sheet-demo-btns">
11-
<Button block variant="outline" theme="primary" onClick={() => setStatusVisible(true)}>
11+
<Button block size="large" variant="outline" theme="primary" onClick={() => setStatusVisible(true)}>
1212
列表型选项状态
1313
</Button>
1414
</div>

src/back-top/_example/base.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,24 @@ export default function Base({ visible, onClose, container }) {
3030
<>
3131
{visible ? <BackTop text={theme.text} theme={theme.theme} onToTop={handleToTop} container={container} /> : null}
3232
<div className="button-group">
33-
<Button className="button" variant="outline" theme="primary" onClick={() => onClick('round', '顶部')}>
33+
<Button
34+
className="button"
35+
block
36+
size="large"
37+
variant="outline"
38+
theme="primary"
39+
onClick={() => onClick('round', '顶部')}
40+
>
3441
圆形返回顶部
3542
</Button>
36-
<Button className="button" variant="outline" theme="primary" onClick={() => onClick('half-round', '返回顶部')}>
43+
<Button
44+
className="button"
45+
block
46+
size="large"
47+
variant="outline"
48+
theme="primary"
49+
onClick={() => onClick('half-round', '返回顶部')}
50+
>
3751
半圆形返回顶部
3852
</Button>
3953
</div>

src/back-top/_example/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default function Base() {
3131
title="BackTop 返回顶部"
3232
summary="当页面过长往下滑动是会出现返回顶部的便捷操作,帮助用户快速回到页面顶部"
3333
/>
34-
<TDemoBlock title="形状" summary="">
34+
<TDemoBlock title="形状" summary="" padding>
3535
<BaseDemo visible={visible} onClose={onClose} container={() => containerRef.current} />
3636
</TDemoBlock>
3737

src/back-top/_example/style/index.less

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,8 @@
33
overflow: auto;
44
height: 100vh;
55

6-
.button-group {
7-
display: flex;
8-
flex-direction: column;
9-
width: 100%;
10-
box-sizing: border-box;
11-
align-items: center;
12-
}
13-
146
.button {
15-
width: 90%;
16-
height: 45px;
17-
background-color: #fff;
18-
margin-bottom: 15px;
7+
margin-bottom: 16px;
198
}
209

2110
.group {

src/message/_example/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ export default function Demo() {
1010
return (
1111
<div className="tdesign-mobile-demo">
1212
<TDemoHeader title="Message 消息通知" summary="用于轻量级反馈或提示,不会打断用户操作。 " />
13-
<TDemoBlock title="01 组件类型" summary="消息通知内容为文本、带操作按钮">
13+
<TDemoBlock title="01 组件类型" summary="消息通知内容为文本、带操作按钮" padding>
1414
<Base />
1515
</TDemoBlock>
16-
<TDemoBlock title="02 组件状态" summary="消息组件风格">
16+
<TDemoBlock title="02 组件状态" summary="消息组件风格" padding>
1717
<Theme />
1818
</TDemoBlock>
19-
<TDemoBlock title="03 关闭所有通知" summary="关闭所有通知">
19+
<TDemoBlock title="03 关闭所有通知" summary="关闭所有通知" padding>
2020
<CloseAll />
2121
</TDemoBlock>
2222
</div>
Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
.container {
2-
display: flex;
3-
flex-direction: column;
4-
align-items: center;
5-
}
6-
71
.button {
8-
width: 90%;
9-
height: 45px;
10-
background-color: #fff;
11-
margin-bottom: 15px;
12-
}
13-
14-
.close-button {
15-
height: 28px;
16-
padding: 3px 16px;
2+
margin-bottom: 16px;
173
}

0 commit comments

Comments
 (0)