Skip to content

Commit

Permalink
feat(badge): support to set border
Browse files Browse the repository at this point in the history
  • Loading branch information
binbin authored and binbin committed Sep 11, 2023
1 parent c640f5d commit 3da6054
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/varlet-ui/src/badge/badge.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
:root {
--badge-content-padding: 2px 6px;
--badge-content-border: none;
--badge-icon-size: 12px;
--badge-default-color: #e0e0e0;
--badge-primary-color: var(--color-primary);
Expand All @@ -16,12 +17,12 @@

&__content {
color: #fff;
border-radius: 100px;
font-size: 12px;
padding: 2px 6px;
vertical-align: middle;
text-align: center;
display: inline-block;
border: var(--badge-content-border);
}

&__icon[var-badge-cover] {
Expand Down
1 change: 1 addition & 0 deletions packages/varlet-ui/src/badge/docs/en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ Here are the CSS variables used by the component, Styles can be customized using
| Variable | Default |
| --- | --- |
| `--badge-content-padding` | `2px 6px` |
| `--badge-content-border`| `none` |
| `--badge-icon-size` | `12px` |
| `--badge-default-color` | `#e0e0e0` |
| `--badge-primary-color` | `var(--color-primary)`|
Expand Down
1 change: 1 addition & 0 deletions packages/varlet-ui/src/badge/docs/zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ function handleChange() {
| 变量名 | 默认值 |
| --- | --- |
| `--badge-content-padding` | `2px 6px` |
| `--badge-content-border`| `none` |
| `--badge-icon-size` | `12px` |
| `--badge-default-color` | `#e0e0e0` |
| `--badge-primary-color` | `var(--color-primary)`|
Expand Down

0 comments on commit 3da6054

Please sign in to comment.