Skip to content

Commit

Permalink
feat(badge): [badge] Adapting to the SMB theme (#2087)
Browse files Browse the repository at this point in the history
* feat(badge): [badge] Adapting to the SMB theme

* feat(badge): [badge] Adapting to the SMB theme

* feat(badge): [badge] Adapting to the SMB theme
  • Loading branch information
Youyou-smiles authored Sep 10, 2024
1 parent ad849e9 commit 44e2779
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/theme/src/badge/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
vertical-align: baseline;
white-space: nowrap;
text-align: center;
margin-left: 4px;
margin-left: var(--ti-badge-margin-left);
border: var(--ti-badge-border) solid #FFFFFF;

&:empty {
Expand Down
3 changes: 2 additions & 1 deletion packages/theme/src/badge/smb-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ export const tinyBadgeSmbTheme = {
'ti-badge-text-color': 'var(--ti-base-color-bg-7)',
'ti-badge-border-radius': 'var(--ti-common-border-radius-4)',
'ti-badge-border': 'var(--ti-common-border-weight-normal)',
'ti-badge-font-weight': 'var(--ti-common-font-weight-normal)'
'ti-badge-font-weight': 'var(--ti-common-font-weight-normal)',
'ti-badge-margin-left': '0'
}
1 change: 1 addition & 0 deletions packages/theme/src/badge/vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@
--ti-badge-danger-bg-color: var(--ti-base-color-error-3, #f66f6a);
--ti-badge-info-bg-color: var(--ti-common-color-info-normal, #252b3a);
--ti-badge-border: 0;
--ti-badge-margin-left: 4px;
}
2 changes: 1 addition & 1 deletion packages/vue/src/badge/src/pc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
type ? 'tiny-badge--' + type : '',
badgeClass || ''
]"
:style="state.transform"
:style="!isDot ? state.transform : ''"
>
<slot name="content">
<a v-if="state.href" :href="state.href" :target="target" rel="noopener noreferrer">{{ state.content }}</a>
Expand Down

0 comments on commit 44e2779

Please sign in to comment.