wuxh
2 years ago
No known key found for this signature in database
GPG Key ID: 464F03149513C20C
1 changed files with
5 additions and
2 deletions
-
components/badge/index.tsx
|
|
@ -111,10 +111,13 @@ const Badge: CompoundedComponent = ({ |
|
|
|
} |
|
|
|
|
|
|
|
const offsetStyle: React.CSSProperties = { marginTop: offset[1] }; |
|
|
|
const offsetX = parseInt(offset[0] as string, 10); |
|
|
|
|
|
|
|
if (direction === 'rtl') { |
|
|
|
offsetStyle.left = parseInt(offset[0] as string, 10); |
|
|
|
offsetStyle.left = -offsetX; |
|
|
|
offsetStyle.transform = 'translate(-50%, -50%)'; |
|
|
|
} else { |
|
|
|
offsetStyle.right = -parseInt(offset[0] as string, 10); |
|
|
|
offsetStyle.right = -offsetX; |
|
|
|
} |
|
|
|
|
|
|
|
return { |
|
|
|