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(dialog-box): [dialog-box] modify smb theme #2147

Merged
merged 1 commit into from
Sep 20, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</template>
<span>半屏弹窗内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility = false"> 确 定 </tiny-button>
<tiny-button plain @click="boxVisibility = false"> 取消 </tiny-button>
<tiny-button type="primary" @click="boxVisibility = false"> 确定 </tiny-button>
</template>
</tiny-dialog-box>
</div>
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/dialog-box/right-dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</template>
<span>半屏弹窗内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility = false"> 确 定 </tiny-button>
<tiny-button plain @click="boxVisibility = false"> 取消 </tiny-button>
<tiny-button type="primary" @click="boxVisibility = false"> 确定 </tiny-button>
</template>
</tiny-dialog-box>
</div>
Expand Down
8 changes: 4 additions & 4 deletions packages/theme/src/dialog-box/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@
flex-direction: column;

.@{dialog-box-prefix-cls}__header,
.@{dialog-box-prefix-cls}__body,
.@{dialog-box-prefix-cls}__footer {
width: calc(100% - var(--ti-dialog-box-drawer-padding-left) - var(--ti-dialog-box-drawer-padding-right));
margin-left: var(--ti-dialog-box-drawer-padding-left);
Expand All @@ -179,7 +178,7 @@
.@{dialog-box-prefix-cls}__header {
padding: var(--ti-dialog-box-drawer-header-padding-top) var(--ti-dialog-box-drawer-header-padding-right)
var(--ti-dialog-box-drawer-header-padding-bottom) var(--ti-dialog-box-drawer-header-padding-left);
border-bottom: 1px solid var(--ti-dialog-box-drawer-divider-border-color);
border-bottom: 1px solid var(--ti-dialog-box-head-divider-border-color);

&btn {
right: calc(
Expand All @@ -192,14 +191,15 @@
.@{dialog-box-prefix-cls}__body {
flex: 1;
overflow: auto;
color: var(--ti-dialog-box-drawer-body-color);
border-bottom: 1px solid var(--ti-dialog-box-drawer-divider-border-color);
padding: var(--ti-dialog-box-drawer-body-padding-top) var(--ti-dialog-box-drawer-body-padding-right)
var(--ti-dialog-box-drawer-body-padding-bottom) var(--ti-dialog-box-drawer-body-padding-left);
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verify closing curly brace indentation.

The closing curly brace for the .dialog-box__body rule appears to be indented incorrectly. It should align with the opening curly brace of the rule.

Apply this diff to fix the indentation:

-      }
+    }
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
}
}


.@{dialog-box-prefix-cls}__footer {
padding: var(--ti-dialog-box-drawer-footer-padding-top) var(--ti-dialog-box-drawer-footer-padding-right)
var(--ti-dialog-box-drawer-footer-padding-bottom) var(--ti-dialog-box-drawer-footer-padding-left);
border-top: 1px solid var(--ti-dialog-box-drawer-divider-border-color);
text-align: var(--ti-dialog-box-drawer-footer-text-align);
}
}
Expand Down
14 changes: 9 additions & 5 deletions packages/theme/src/dialog-box/vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@
// 内容字号
--ti-dialog-box-body-font-size: var(--ti-common-font-size-base, 12px);
// 内容字体色
--ti-dialog-box-body-text-color: var(--ti-common-color-text-primary);
--ti-dialog-box-body-text-color: var(--ti-common-color-text-secondary);
// 右侧弹窗内容字体色
--ti-dialog-box-drawer-body-color: var(--ti-common-color-text-primary);
// 内容垂直内边距
--ti-dialog-box-body-padding-vertical: var(--ti-common-space-0, 0px);
// 内容水平内边距
Expand Down Expand Up @@ -95,19 +97,19 @@
// 抽屉头部左内边距
--ti-dialog-box-drawer-header-padding-left: var(--ti-common-space-0, 0px);
// 抽屉头部右内边距
--ti-dialog-box-drawer-body-padding-right: var(--ti-common-space-0, 0px);
--ti-dialog-box-drawer-body-padding-right: var(--ti-common-space-8x);
// 抽屉内容上内边距
--ti-dialog-box-drawer-body-padding-top: var(--ti-common-space-0, 0px);
// 抽屉内容下内边距
--ti-dialog-box-drawer-body-padding-bottom: var(--ti-common-space-0, 0px);
// 抽屉内容左内边距
--ti-dialog-box-drawer-body-padding-left: var(--ti-common-space-0, 0px);
--ti-dialog-box-drawer-body-padding-left: var(--ti-common-space-8x);
// 抽屉内容右内边距
--ti-dialog-box-drawer-header-padding-right: var(--ti-common-space-0, 0px);
// 抽屉底部文本对齐方式
--ti-dialog-box-drawer-footer-text-align: right;
// 抽屉底部上内边距
--ti-dialog-box-drawer-footer-padding-top: var(--ti-common-space-5x, 20px);
--ti-dialog-box-drawer-footer-padding-top: var(--ti-common-space-6x);
// 抽屉底部下内边距
--ti-dialog-box-drawer-footer-padding-bottom: var(--ti-common-space-8x, 32px);
// 抽屉底部左内边距
Expand All @@ -118,8 +120,10 @@
--ti-dialog-box-drawer-footer-margin-left: var(--ti-common-space-8x, 32px);
// 抽屉底部右外边距
--ti-dialog-box-drawer-footer-margin-right: var(--ti-common-space-10x, 40px);
// 抽屉内容与底部边框颜色
--ti-dialog-box-drawer-divider-border-color: var(--ti-common-color-line-dividing);
// 抽屉头部与底部边框颜色
--ti-dialog-box-drawer-divider-border-color: transparent;
--ti-dialog-box-header-divider-border-color: var(--ti-common-color-transparent);
// 抽屉边框圆角
--ti-dialog-box-drawer-radius: var(--ti-common-space-0, 0px);
// 弹窗布局模式(hide)
Expand Down
Loading