Skip to content

Commit

Permalink
feat(popconfirm): [popconfirm] Adapting to the SMB theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Youyou-smiles committed Sep 9, 2024
1 parent 9bdc957 commit 65d988c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/design/smb/src/popconfirm/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { iconWarningTriangle, iconPromptExclamation } from '@opentiny/vue-icon'
import { iconWarningTriangle, iconHelp } from '@opentiny/vue-icon'

export default {
icons: {
warning: iconWarningTriangle(),
info: iconPromptExclamation()
info: iconHelp()
}
}
3 changes: 2 additions & 1 deletion packages/theme/src/popconfirm/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
height: var(--ti-popconfirm-popover-icon-width);
width: var(--ti-popconfirm-popover-icon-width);
margin-right: var(--ti-popconfirm-popover-icon-margin-right);
margin-bottom: var(--ti-popconfirm-popover-icon-margin-bottom);
}

&__title {
Expand Down Expand Up @@ -88,7 +89,7 @@
}

&--warning {
fill: #fdc000;
fill: #FF8800;
}

&--success {
Expand Down
3 changes: 2 additions & 1 deletion packages/theme/src/popconfirm/smb-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ export const tinyPopconfirmSmbTheme = {
'ti-popconfirm-popover-icon-margin-right': 'var(--ti-common-space-base)',
'ti-popconfirm-popover-margin-bottom': '8px',
'ti-popconfirm-popover-text-color': '#191919',
'ti-popconfirm-popover-line-height': '1.5'
'ti-popconfirm-popover-line-height': '1.5',
'ti-popconfirm-popover-icon-margin-bottom': '2px'
}
3 changes: 2 additions & 1 deletion packages/theme/src/popconfirm/vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
// 提示弹窗容器垂直内边距
--ti-popconfirm-popover-container-padding-vertical: var(--ti-common-space-base, 4px);
// 提示弹窗图标大小
--ti-popconfirm-popover-icon-width: var(--ti-common-size-6x, 24px);
--ti-popconfirm-popover-icon-width: calc(var(--ti-common-size-3x) + 2px);
--ti-popconfirm-popover-icon-margin-bottom: unset;
// 提示弹窗图标上侧外边距
--ti-popconfirm-popover-icon-margin-right: var(--ti-common-space-2x, 8px);
// 提示弹窗底部按钮容器上侧外边距
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/popconfirm/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const $constants = {
ICON_MAP: {
success: 'icon-success',
error: 'icon-error',
info: 'icon-info-solid',
info: 'icon-help',
warning: 'icon-warning'
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/vue/src/popconfirm/src/pc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import { setup, $prefix, defineComponent } from '@opentiny/vue-common'
import { renderless, api } from '@opentiny/vue-renderless/popconfirm/vue'
import Popover from '@opentiny/vue-popover'
import Button from '@opentiny/vue-button'
import { iconError, iconInfoSolid, iconWarning, iconSuccess } from '@opentiny/vue-icon'
import { iconError, IconHelp, iconWarning, iconSuccess } from '@opentiny/vue-icon'
import '@opentiny/vue-theme/popconfirm/index.less'
export default defineComponent({
Expand All @@ -64,7 +64,7 @@ export default defineComponent({
TinyPopover: Popover,
TinyButton: Button,
IconSuccess: iconSuccess(),
IconInfoSolid: iconInfoSolid(),
IconHelp: IconHelp(),
IconWarning: iconWarning(),
IconError: iconError()
},
Expand Down

0 comments on commit 65d988c

Please sign in to comment.