From 427d0435b7a37f6823c5ac55465e8731119a5c8f Mon Sep 17 00:00:00 2001 From: Stanley Thijssen Date: Sun, 21 Jul 2019 13:01:27 +0800 Subject: [PATCH] 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 --- .../rate/__tests__/__snapshots__/demo.test.js.snap | 12 ++++++++++-- components/rate/demo/clear.md | 6 ++++-- components/rate/style/index.less | 5 ++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/components/rate/__tests__/__snapshots__/demo.test.js.snap b/components/rate/__tests__/__snapshots__/demo.test.js.snap index 75fd676bb6..5efa684d04 100644 --- a/components/rate/__tests__/__snapshots__/demo.test.js.snap +++ b/components/rate/__tests__/__snapshots__/demo.test.js.snap @@ -1133,7 +1133,11 @@ exports[`renders ./components/rate/demo/clear.md correctly 1`] = ` - allowClear: true + + allowClear: true +
- allowClear: false + + allowClear: false + `; diff --git a/components/rate/demo/clear.md b/components/rate/demo/clear.md index a966bcbe6b..9111890087 100644 --- a/components/rate/demo/clear.md +++ b/components/rate/demo/clear.md @@ -18,9 +18,11 @@ import { Rate } from 'antd'; ReactDOM.render(
- allowClear: true + + allowClear: true
- allowClear: false + + allowClear: false
, mountNode, ); diff --git a/components/rate/style/index.less b/components/rate/style/index.less index 9f73fa3864..34214491f9 100644 --- a/components/rate/style/index.less +++ b/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;