Skip to content

Commit ada7539

Browse files
authored
fix(Button): update demo style (#2811)
1 parent 3c0af32 commit ada7539

File tree

10 files changed

+42
-17
lines changed

10 files changed

+42
-17
lines changed

src/button/__test__/__snapshots__/demo.test.js.snap

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,12 @@ exports[`Button Button icon-btn demo works fine 1`] = `
169169
class="button-example"
170170
>
171171
<t-button
172-
class="margin"
173172
content="填充按钮"
174173
icon="app"
175174
size="large"
176175
theme="primary"
177176
/>
178177
<t-button
179-
class="margin"
180178
loading="{{true}}"
181179
size="large"
182180
theme="primary"
@@ -185,7 +183,6 @@ exports[`Button Button icon-btn demo works fine 1`] = `
185183
</t-button>
186184
<t-button
187185
ariaLabel="搜索"
188-
class="margin"
189186
icon="search"
190187
shape="square"
191188
size="large"

src/button/_example/base/index.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"component": true,
3+
"styleIsolation": "shared",
34
"usingComponents": {
45
"t-button": "tdesign-miniprogram/button/button"
56
}

src/button/_example/base/index.wxss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
.button-example {
22
margin: 32rpx;
33
display: flex;
4+
justify-content: space-between;
5+
}
6+
7+
.button-example:after {
8+
content: '';
9+
flex: auto;
410
}

src/button/_example/button.less

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
page {
22
background-color: #fff;
33
}
4+
5+
.t-button {
6+
margin-right: 32rpx;
7+
}
8+
9+
.t-button:last-child {
10+
margin-right: 0;
11+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
.button-example {
22
margin: 32rpx;
33
display: flex;
4+
justify-content: space-between;
5+
}
6+
7+
.button-example:after {
8+
content: '';
9+
flex: auto;
410
}
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
.button-example {
22
margin: 32rpx;
33
display: flex;
4-
justify-content: space-between;
5-
}
6-
7-
.group-btn {
8-
margin: 0 16rpx;
94
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<view class="button-example">
2-
<t-button theme="primary" icon="app" content="填充按钮" size="large" class="margin"></t-button>
3-
<t-button wx:if="{{skylineRender}}" theme="light" size="large" class="margin">
4-
<t-loading t-class="loading" theme="spinner" size="40rpx" class="wrapper" text="加载中..." />
2+
<t-button theme="primary" icon="app" content="填充按钮" size="large"></t-button>
3+
<t-button wx:if="{{skylineRender}}" theme="light" size="large">
4+
<t-loading t-class="loading" theme="spinner" size="40rpx" text="加载中..." />
55
</t-button>
6-
<t-button wx:else theme="primary" size="large" loading class="margin">加载中</t-button>
7-
<t-button theme="primary" icon="search" shape="square" size="large" class="margin" aria-label="搜索"></t-button>
6+
<t-button wx:else theme="primary" size="large" loading>加载中</t-button>
7+
<t-button theme="primary" icon="search" shape="square" size="large" aria-label="搜索"></t-button>
88
</view>

src/button/_example/icon-btn/index.wxss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
.margin {
2-
margin-left: 32rpx;
3-
}
4-
51
.button-example {
62
margin: 32rpx;
73
display: flex;
4+
justify-content: space-between;
5+
}
6+
7+
.button-example:after {
8+
content: '';
9+
flex: auto;
810
}
911

1012
.button-example .loading {

src/button/_example/skyline/button.less

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,13 @@ page {
55
.button-example {
66
margin: 32rpx;
77
display: flex;
8+
justify-content: space-between;
9+
}
10+
11+
.t-button {
12+
margin-right: 32rpx;
13+
}
14+
15+
.t-button:last-child {
16+
margin-right: 0;
817
}

src/button/_example/theme/index.wxss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.button-example {
22
margin: 32rpx;
33
display: flex;
4+
justify-content: space-between;
45
}

0 commit comments

Comments
 (0)