Skip to content

Commit

Permalink
💄 fix Radio Group style with Badge
Browse files Browse the repository at this point in the history
close #21213
  • Loading branch information
afc163 committed Feb 4, 2020
1 parent ad51283 commit 921d2ba
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
34 changes: 34 additions & 0 deletions components/radio/demo/badge.md
@@ -0,0 +1,34 @@
---
order: 99
debug: true
title:
zh-CN: Badge style
en-US: 测试 Badge 的样式
---

## zh-CN

测试 Badge 的样式。

## en-US

Test Badge style.

```jsx
import { Radio, Badge } from 'antd';

ReactDOM.render(
<Radio.Group buttonStyle="solid">
<Badge count={1}>
<Radio.Button value={1}>
Click Me
</Radio.Button>
</Badge>
<Badge count={2}>
<Radio.Button value={2}>
Not Me
</Radio.Button>
</Badge>
</Radio.Group>
, mountNode);
```
9 changes: 9 additions & 0 deletions components/radio/style/index.less
Expand Up @@ -16,6 +16,14 @@
&-rtl {
direction: rtl;
}

.@{ant-prefix}-badge-count {
z-index: 1;
}

> .@{ant-prefix}-badge:not(:first-child) > .@{radio-prefix-cls}-button-wrapper {
border-left: none;
}
}

// 一般状态
Expand Down Expand Up @@ -209,6 +217,7 @@ span.@{radio-prefix-cls} + * {
content: '';
}
}

&:first-child {
border-left: @border-width-base @border-style-base @border-color-base;
border-radius: @border-radius-base 0 0 @border-radius-base;
Expand Down

0 comments on commit 921d2ba

Please sign in to comment.