Skip to content

Commit

Permalink
docs: improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
anlyyao committed Mar 4, 2022
1 parent b5c94cf commit 7a3b0c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
3 changes: 1 addition & 2 deletions src/button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ isComponent: true
| ghost | Boolean | false | 是否为幽灵按钮(镂空按钮)| N |
| icon | String | - | 图标名称| N |
| loading | Boolean | false | 是否显示为加载状态| N |
| shape | String | rectangle | 按钮形状,有4种:长方形/正方形/圆角长方形/圆形。可选项:rectangle/square/round/ircle| N |
shape默认retangel
| shape | String | rectangle | 按钮形状,有4种:长方形/正方形/圆角长方形/圆形。可选项:rectangle/square/round/circle| N |
| size | String | medium | 组件尺寸。可选项:small/medium/large。TS 类型:`SizeEnum`| N |
| theme | String | undefined | 组件风格,依次为品牌色、危险色。可选项:default/primary/danger| N |
| type | String | - | 同小程序的 formType。可选项:submit/reset| N |
Expand Down
16 changes: 6 additions & 10 deletions src/button/button.less
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,22 @@
@button-small-height: 36 * 2rpx;
@button-small-line-height: 36 * 2rpx;
@button-large-height: 44 * 2rpx;
// 圆角

// button icon
@button-icon-spacer: @spacer;
@button-icon-border-radius: 8rpx;

// padding
@button-padding-horizontal-s: 8px;
@button-padding-horizontal-default: 12px;
@button-padding-horizontal-m: 12px;
@button-padding-horizontal-l: 16px;

// 图标大小
@button-icon-size-s: 36rpx;
@button-icon-size-default: 40rpx;
@button-icon-size-m: 40rpx;
@button-icon-size-l: 44rpx;



@button: ~"@{prefix}-button";

.@{button} {
Expand Down Expand Up @@ -177,8 +176,8 @@
&--base {
height: @button-default-height;
line-height: @button-default-height;
padding-left: (@button-padding-horizontal-default - @button-border-width);
padding-right: (@button-padding-horizontal-default - @button-border-width);
padding-left: (@button-padding-horizontal-m - @button-border-width);
padding-right: (@button-padding-horizontal-m - @button-border-width);
font-size: @button-default-font-size;
}

Expand All @@ -195,9 +194,8 @@
}

&-m {

& .@{prefix}-button__icon {
font-size: @button-icon-size-default;
font-size: @button-icon-size-m;
}
}

Expand Down Expand Up @@ -273,7 +271,6 @@
&-s {
border-radius: 50%;
width: @button-small-height;

}
}
}
Expand All @@ -296,7 +293,6 @@
&.button-hover:after {
border-radius: 8rpx;
}

}

// button group
Expand Down

0 comments on commit 7a3b0c3

Please sign in to comment.