Skip to content

Commit d883045

Browse files
bindoonyouluna
authored andcommitted
fix(Rating): hover color when score<2 and disabled fix #3400
1 parent 3f5ec74 commit d883045

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

docs/rating/demo/disabled.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,9 @@ Rating component can only display score when you set `disabled` attribute.
1818
````jsx
1919
import { Rating } from '@alifd/next';
2020

21-
ReactDOM.render(<Rating defaultValue={3.5} disabled />, mountNode);
21+
ReactDOM.render(<div>
22+
<Rating defaultValue={2.5} disabled />
23+
<br/>
24+
<Rating defaultValue={1.5} disabled />
25+
</div>, mountNode);
2226
````

src/rating/main.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
}
120120
}
121121

122-
&:focus,
122+
&:focus #{$rating-prefix}-base:not(#{$rating-prefix}-base-disabled),
123123
&.hover {
124124
outline: none;
125125
#{$rating-prefix}-overlay {

0 commit comments

Comments
 (0)