Browse Source

style: Remove right-margin of last item in Rate component (#17764)

* Removed right margin from last rating star

* Updated demo file to be inline with other demo that makes use of text

* Updated snapshot
pull/17767/head
Stanley Thijssen 5 years ago
committed by 偏右
parent
commit
427d0435b7
  1. 8
      components/rate/__tests__/__snapshots__/demo.test.js.snap
  2. 6
      components/rate/demo/clear.md
  3. 5
      components/rate/style/index.less

8
components/rate/__tests__/__snapshots__/demo.test.js.snap

@ -1133,7 +1133,11 @@ exports[`renders ./components/rate/demo/clear.md correctly 1`] = `
</div>
</li>
</ul>
<span
class="ant-rate-text"
>
allowClear: true
</span>
<br />
<ul
class="ant-rate"
@ -1431,7 +1435,11 @@ exports[`renders ./components/rate/demo/clear.md correctly 1`] = `
</div>
</li>
</ul>
<span
class="ant-rate-text"
>
allowClear: false
</span>
</div>
`;

6
components/rate/demo/clear.md

@ -18,9 +18,11 @@ import { Rate } from 'antd';
ReactDOM.render(
<div>
<Rate defaultValue={3} /> allowClear: true
<Rate defaultValue={3} />
<span className="ant-rate-text">allowClear: true</span>
<br />
<Rate allowClear={false} defaultValue={3} /> allowClear: false
<Rate allowClear={false} defaultValue={3} />
<span className="ant-rate-text">allowClear: false</span>
</div>,
mountNode,
);

5
components/rate/style/index.less

@ -26,12 +26,15 @@
position: relative;
display: inline-block;
margin: 0;
margin-right: 8px;
padding: 0;
color: inherit;
cursor: pointer;
transition: all 0.3s;
&:not(:last-child) {
margin-right: 8px;
}
> div {
&:focus {
outline: 0;

Loading…
Cancel
Save