Skip to content

Commit

Permalink
feat(progress): enable circle label css variable
Browse files Browse the repository at this point in the history
  • Loading branch information
betavs committed Nov 22, 2024
1 parent a53836f commit b458950
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 21 deletions.
23 changes: 14 additions & 9 deletions src/progress/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ status | String | - | options: success/error/warning/active。Typescript:`Prog
stroke-width | String / Number | - | \- | N
theme | String | line | options: line/plump/circle。Typescript:`ProgressTheme` `type ProgressTheme = 'line' \| 'plump' \| 'circle'`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/progress/type.ts) | N
track-color | String | '' | \- | N

### Progress External Classes

className | Description
Expand All @@ -26,13 +27,17 @@ t-class-label | \-
### CSS Variables

The component provides the following CSS variables, which can be used to customize styles.
Name | Default Value | Description

Name | Default Value | Description
-- | -- | --
--td-progress-circle-inner-bg-color | @font-white-1 | -
--td-progress-circle-width | 224rpx | -
--td-progress-circle-from | 0deg | -
--td-progress-inner-bg-color | @brand-color | -
--td-progress-line-stroke-width | 12rpx | -
--td-progress-stroke-circle-width | 12rpx | -
--td-progress-stroke-plump-width | 40rpx | -
--td-progress-track-bg-color | @bg-color-component | -
--td-progress-circle-inner-bg-color | @font-white-1 | -
--td-progress-circle-width | 224rpx | -
--td-progress-circle-from | 0deg | -
--td-progress-inner-bg-color | @brand-color | -
--td-progress-line-stroke-width | 12rpx | -
--td-progress-stroke-circle-width | 12rpx | -
--td-progress-stroke-plump-width | 40rpx | -
--td-progress-track-bg-color | @bg-color-component | -
--td-progress-circle-label-font-size | 40rpx | -
--td-progress-circle-label-line-height | 56rpx | -
--td-progress-circle-label-font-weight | 700 | -
23 changes: 14 additions & 9 deletions src/progress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ status | String | - | 进度条状态。可选项:success/error/warning/active
stroke-width | String / Number | - | 进度条线宽,默认单位 `px` | N
theme | String | line | 进度条风格。值为 line,标签(label)显示在进度条右侧;值为 plump,标签(label)显示在进度条里面;值为 circle,标签(label)显示在进度条正中间。可选项:line/plump/circle。TS 类型:`ProgressTheme` `type ProgressTheme = 'line' \| 'plump' \| 'circle'`[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/progress/type.ts) | N
track-color | String | '' | 进度条未完成部分颜色 | N

### Progress External Classes

类名 | 描述
Expand All @@ -88,13 +89,17 @@ t-class-label | 标签样式类
### CSS Variables

组件提供了下列 CSS 变量,可用于自定义样式。
名称 | 默认值 | 描述

名称 | 默认值 | 描述
-- | -- | --
--td-progress-circle-inner-bg-color | @font-white-1 | -
--td-progress-circle-width | 224rpx | -
--td-progress-circle-from | 0deg | -
--td-progress-inner-bg-color | @brand-color | -
--td-progress-line-stroke-width | 12rpx | -
--td-progress-stroke-circle-width | 12rpx | -
--td-progress-stroke-plump-width | 40rpx | -
--td-progress-track-bg-color | @bg-color-component | -
--td-progress-circle-inner-bg-color | @font-white-1 | -
--td-progress-circle-width | 224rpx | -
--td-progress-circle-from | 0deg | -
--td-progress-inner-bg-color | @brand-color | -
--td-progress-line-stroke-width | 12rpx | -
--td-progress-stroke-circle-width | 12rpx | -
--td-progress-stroke-plump-width | 40rpx | -
--td-progress-track-bg-color | @bg-color-component | -
--td-progress-circle-label-font-size | 40rpx | -
--td-progress-circle-label-line-height | 56rpx | -
--td-progress-circle-label-font-weight | 700 | -
6 changes: 3 additions & 3 deletions src/progress/progress.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
@progress-plump-label-font-size: @font-size-s;
@progress-circle-width: var(--td-progress-circle-width, 224rpx);
@progress-circle-from: 0deg;
@progress-circle-label-font-size: 40rpx;
@progress-circle-label-line-height: 56rpx;
@progress-circle-label-font-weight: 700;
@progress-circle-label-font-size: var(--td-progress-circle-label-font-size, 40rpx);
@progress-circle-label-line-height: var(--td-progress-circle-label-line-height, 56rpx);
@progress-circle-label-font-weight: var(--td-progress-circle-label-font-weight, 700);
@progress-info-spacer: @spacer; // 间距
@progress-inner-transition: all @anim-duration-base @anim-time-fn-easing;

Expand Down

0 comments on commit b458950

Please sign in to comment.