fix: fix position of checkbox and icon (#13999)

Minor UI Fix 

Checkbox and icon are not center horizontally which look little odd so
make them horizonatally center

Before 
<img width="396" height="57" alt="Screenshot 2025-08-20 at 8 48 23 PM"
src="https://github.com/user-attachments/assets/1505b2e6-6b39-498b-a1be-93d11ca89494"
/>

After 
<img width="392" height="56" alt="image"
src="https://github.com/user-attachments/assets/ffa68625-8014-4e58-9211-3e9b822dfa35"
/>
This commit is contained in:
Kailash Rajput
2025-08-20 18:07:39 +02:00
committed by GitHub
parent 42a760a94d
commit f72c3d73bf
2 changed files with 10 additions and 3 deletions
@@ -82,7 +82,7 @@ export const OverridableCheckbox = ({
onClick={disabled ? undefined : onChange}
isDisabled={disabled}
>
<AnimatedRotate animateOnHover>
<AnimatedRotate animateOnHover={!disabled}>
<IconReload
size={theme.icon.size.md}
color={theme.adaptiveColors.orange4}
@@ -1,4 +1,5 @@
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { type AnimationDuration } from '@ui/theme';
import { type HTMLMotionProps, motion } from 'framer-motion';
@@ -10,6 +11,12 @@ type AnimatedRotateProps = Omit<
animateOnHover?: boolean;
};
const StyledMotionDiv = styled(motion.div)`
align-items: center;
display: flex;
justify-content: center;
`;
export const AnimatedRotate = ({
children,
duration = 'fast',
@@ -24,7 +31,7 @@ export const AnimatedRotate = ({
};
return (
<motion.div
<StyledMotionDiv
initial={initial}
animate={animate}
transition={transition}
@@ -41,6 +48,6 @@ export const AnimatedRotate = ({
}
>
{children}
</motion.div>
</StyledMotionDiv>
);
};