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

feat(loading): add css variable for text color #2272

Closed
wants to merge 2 commits into from
Closed
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
1 change: 1 addition & 0 deletions src/loading/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ The component provides the following CSS variables, which can be used to customi
Name | Default Value | Description
-- | -- | --
--td-loading-color | @brand-color | -
--td-loading-text-color | @font-gray-1 | -
--td-loading-text-font-size | 24rpx | -
--td-loading-text-line-height | 40rpx | -
1 change: 1 addition & 0 deletions src/loading/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,6 @@ t-class-indicator | 指示符样式类
名称 | 默认值 | 描述
-- | -- | --
--td-loading-color | @brand-color | -
--td-loading-text-color | @font-gray-1 | -
--td-loading-text-font-size | 24rpx | -
--td-loading-text-line-height | 40rpx | -
2 changes: 2 additions & 0 deletions src/loading/loading.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@loading: ~'@{prefix}-loading';

@loading-color: var(--td-loading-color, @brand-color);
@loading-text-color: var(--td-loading-text-color, @font-gray-1);
@loading-text-font-size: var(--td-loading-text-font-size, 24rpx);
@loading-text-line-height: var(--td-loading-text-line-height, 40rpx);

Expand Down Expand Up @@ -89,6 +90,7 @@
}

&__text {
color: @loading-text-color;
font-size: @loading-text-font-size;
line-height: @loading-text-line-height;

Expand Down
8 changes: 4 additions & 4 deletions src/navbar/__test__/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ exports[`navbar :base 2`] = `
<t-navbar>
<wx-view
class="t-navbar t-navbar--fixed t-navbar--hide-animation class t-class"
style="--td-navbar-padding-top:20px; --td-navbar-right:94px; --td-navbar-capsule-height: 32px; --td-navbar-capsule-width: 87px; --td-navbar-height: 94px;"
style=""
>
<wx-view
class="t-navbar__placeholder"
Expand Down Expand Up @@ -75,7 +75,7 @@ exports[`navbar :base 3`] = `
<t-navbar>
<wx-view
class="t-navbar t-navbar--fixed t-navbar--hide class t-class"
style="--td-navbar-padding-top:20px; --td-navbar-right:94px; --td-navbar-capsule-height: 32px; --td-navbar-capsule-width: 87px; --td-navbar-height: 94px;"
style=""
>
<wx-view
class="t-navbar__placeholder"
Expand Down Expand Up @@ -110,7 +110,7 @@ exports[`navbar :fixed 1`] = `
<t-navbar>
<wx-view
class="t-navbar t-navbar--fixed t-navbar--visible-animation class t-class"
style="--td-navbar-padding-top:20px; --td-navbar-right:94px; --td-navbar-capsule-height: 32px; --td-navbar-capsule-width: 87px; --td-navbar-height: 94px;"
style=""
>
<wx-view
class="t-navbar__placeholder"
Expand Down Expand Up @@ -145,7 +145,7 @@ exports[`navbar :menu button 1`] = `
<t-navbar>
<wx-view
class="t-navbar t-navbar--fixed class t-class"
style="--td-navbar-padding-top:20px; --td-navbar-right:428px; --td-navbar-capsule-height: 10px; --td-navbar-capsule-width: 40px; --td-navbar-height: -10px;"
style="--td-navbar-padding-top:20px; --td-navbar-right:414px; --td-navbar-capsule-height: 10px; --td-navbar-capsule-width: 40px; --td-navbar-height: -10px;"
>
<wx-view
class="t-navbar__placeholder"
Expand Down
Loading