mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
refactor: rate full token (#35886)
This commit is contained in:
parent
8f5b9b5f84
commit
2336b39894
@ -1,7 +1,7 @@
|
||||
// deps-lint-skip-all
|
||||
import type { CSSObject } from '@ant-design/cssinjs';
|
||||
import type { GenerateStyle, FullToken } from '../../_util/theme';
|
||||
import { resetComponent, genComponentStyleHook, mergeToken } from '../../_util/theme';
|
||||
import type { FullToken, GenerateStyle } from '../../_util/theme';
|
||||
import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme';
|
||||
|
||||
interface RateToken extends FullToken<'Rate'> {
|
||||
rateStarColor: string;
|
||||
@ -35,7 +35,7 @@ const genRateStarStyle: GenerateStyle<RateToken, CSSObject> = token => {
|
||||
},
|
||||
|
||||
'&:focus-visible': {
|
||||
outline: `1px dashed ${token.colorSplit}`,
|
||||
outline: `${token.lineWidth} dashed ${token.colorSplit}`,
|
||||
transform: token.rateStarHoverScale,
|
||||
},
|
||||
},
|
||||
@ -121,10 +121,9 @@ const genRateStyle: GenerateStyle<RateToken> = token => {
|
||||
// ============================== Export ==============================
|
||||
export default genComponentStyleHook('Rate', token => {
|
||||
const rateToken = mergeToken<RateToken>(token, {
|
||||
// FIXME: missing token
|
||||
rateStarColor: '#fadb14', // @yellow-6
|
||||
rateStarSize: 20, // fixed-value
|
||||
rateStarHoverScale: 'scale(1.1)', // fixed-value
|
||||
rateStarColor: token.yellow,
|
||||
rateStarSize: token.controlHeightLG * 0.5,
|
||||
rateStarHoverScale: 'scale(1.1)',
|
||||
});
|
||||
return [genRateStyle(rateToken)];
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user