Skip to content

The open alternative to Salesforce, designed for AI.

FIx minor issue related to gap between checkbox & menu item label (#8220)

parmarKaran01316537a68a4b
diff --git a/packages/twenty-ui/src/input/components/Checkbox.tsx b/packages/twenty-ui/src/input/components/Checkbox.tsx
index bdef30acfbb..b981ea0274a 100644
--- a/packages/twenty-ui/src/input/components/Checkbox.tsx
+++ b/packages/twenty-ui/src/input/components/Checkbox.tsx
@@ -43,8 +43,13 @@ type InputProps = {
};
const StyledInputContainer = styled.div<InputProps>`
- --size: ${({ checkboxSize }) =>
- checkboxSize === CheckboxSize.Large ? '32px' : '24px'};
+ --size: ${({ checkboxSize, hoverable }) => {
+ if (hoverable === true) {
+ return checkboxSize === CheckboxSize.Large ? '32px' : '24px';
+ } else {
+ return checkboxSize === CheckboxSize.Large ? '20px' : '14px';
+ }
+ }};
align-items: center;
border-radius: ${({ theme, shape }) =>
shape === CheckboxShape.Rounded
@@ -53,10 +58,15 @@ const StyledInputContainer = styled.div<InputProps>`
cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};
display: flex;
- padding: ${({ theme, checkboxSize }) =>
- checkboxSize === CheckboxSize.Large
- ? theme.spacing(1.5)
- : theme.spacing(1.25)};
+ padding: ${({ theme, checkboxSize, hoverable }) => {
+ if (hoverable === true) {
+ return checkboxSize === CheckboxSize.Large
+ ? theme.spacing(1.5)
+ : theme.spacing(1.25);
+ } else {
+ return 0;
+ }
+ }};
position: relative;
${({ hoverable, isChecked, theme, indeterminate, disabled }) => {
if (!hoverable || disabled === true) return '';