Browse Source

fix: spin icon in Badge should have correct animation (#42575)

pull/42584/head
MadCcc 2 years ago
committed by GitHub
parent
commit
e6d86df3a9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      components/badge/style/index.ts

8
components/badge/style/index.ts

@ -1,8 +1,8 @@
import type { CSSObject } from '@ant-design/cssinjs';
import { Keyframes } from '@ant-design/cssinjs';
import type { FullToken, GenerateStyle } from '../../theme/internal';
import { genComponentStyleHook, mergeToken, genPresetColor } from '../../theme/internal';
import { resetComponent } from '../../style';
import type { FullToken, GenerateStyle } from '../../theme/internal';
import { genComponentStyleHook, genPresetColor, mergeToken } from '../../theme/internal';
interface BadgeToken extends FullToken<'Badge'> {
badgeFontHeight: number;
@ -150,9 +150,9 @@ const genSharedBadgeStyle: GenerateStyle<BadgeToken> = (token: BadgeToken): CSSO
insetInlineEnd: 0,
transform: 'translate(50%, -50%)',
transformOrigin: '100% 0%',
[`${iconCls}-spin`]: {
[`&${iconCls}-spin`]: {
animationName: antBadgeLoadingCircle,
animationDuration: token.motionDurationMid,
animationDuration: '1s',
animationIterationCount: 'infinite',
animationTimingFunction: 'linear',
},

Loading…
Cancel
Save