Skip to content

Commit

Permalink
feat(Popup): update css vars
Browse files Browse the repository at this point in the history
  • Loading branch information
anlyyao committed Jul 31, 2024
1 parent 80f330f commit 2c70cd3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions script/generate-css-vars.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ if (combine[COMPONENT_NAME]) {
}

// 追加到文件
const cssVariableHeadContent = `\n\n### CSS 变量\n组件提供了下列 CSS 变量,可用于自定义样式。\n名称 | 默认值 | 描述 \n-- | -- | --\n`;
const cssVariableHeadContentEn = `\n\n### CSS Variables\nThe component provides the following CSS variables, which can be used to customize styles.\nName | Default Value | Description \n-- | -- | --\n`;
const cssVariableHeadContent = `\n\n### CSS Variables\n\n组件提供了下列 CSS 变量,可用于自定义样式。\n名称 | 默认值 | 描述 \n-- | -- | --\n`;
const cssVariableHeadContentEn = `\n\n### CSS Variables\n\nThe component provides the following CSS variables, which can be used to customize styles.\nName | Default Value | Description \n-- | -- | --\n`;

fs.appendFileSync(resolveCwd(`src/${COMPONENT_NAME}/README.md`), cssVariableHeadContent);
fs.appendFileSync(resolveCwd(`src/${COMPONENT_NAME}/README.en-US.md`), cssVariableHeadContentEn);
Expand Down
3 changes: 2 additions & 1 deletion src/popup/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ The component provides the following CSS variables, which can be used to customi
Name | Default Value | Description
-- | -- | --
--td-popup-bg-color | @bg-color-container | -
--td-popup-border-radius | @radius-default | -
--td-popup-border-radius | @radius-default | -
--td-popup-close-btn-color | @text-color-primary | -
3 changes: 2 additions & 1 deletion src/popup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,5 @@ t-class-content | 内容样式类
名称 | 默认值 | 描述
-- | -- | --
--td-popup-bg-color | @bg-color-container | -
--td-popup-border-radius | @radius-default | -
--td-popup-border-radius | @radius-default | -
--td-popup-close-btn-color | @text-color-primary | -
3 changes: 3 additions & 0 deletions src/popup/popup.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
@popup-bg-color: var(--td-popup-bg-color, @bg-color-container);
@popup-border-radius: var(--td-popup-border-radius, @radius-default);

@popup-close-btn-color: var(--td-popup-close-btn-color, @text-color-primary);

.@{popup} {
position: fixed;
z-index: 11500;
Expand All @@ -25,6 +27,7 @@
right: 0;
padding: 20rpx;
line-height: 1;
color: @popup-close-btn-color;
}

&--top {
Expand Down

0 comments on commit 2c70cd3

Please sign in to comment.