From dd6270e058fe03f97939da0190bbda6df47ac633 Mon Sep 17 00:00:00 2001 From: Amit Amrutiya Date: Fri, 13 Dec 2024 15:49:30 +0530 Subject: [PATCH] fix: build in sistent Signed-off-by: Amit Amrutiya --- src/constants/iconsSizes.ts | 5 +++++ src/custom/UserSearchField/UserSearchField.tsx | 2 ++ .../VisibilityChipMenu/VisibilityChipMenu.tsx | 13 +++++++------ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/constants/iconsSizes.ts b/src/constants/iconsSizes.ts index d9a1dc9c..bd09817f 100644 --- a/src/constants/iconsSizes.ts +++ b/src/constants/iconsSizes.ts @@ -1,5 +1,10 @@ // icon styles, setting general height and width properties to solves scaling and consistency problems +export const iconXSmall = { + height: 16, + width: 16 +}; + export const iconSmall = { height: 20, width: 20 diff --git a/src/custom/UserSearchField/UserSearchField.tsx b/src/custom/UserSearchField/UserSearchField.tsx index c6e7feea..0132ab9d 100644 --- a/src/custom/UserSearchField/UserSearchField.tsx +++ b/src/custom/UserSearchField/UserSearchField.tsx @@ -136,6 +136,8 @@ const UserShareSearch: React.FC = ({ x} options={options} disableClearable diff --git a/src/custom/VisibilityChipMenu/VisibilityChipMenu.tsx b/src/custom/VisibilityChipMenu/VisibilityChipMenu.tsx index 5d0bef49..86492ff1 100644 --- a/src/custom/VisibilityChipMenu/VisibilityChipMenu.tsx +++ b/src/custom/VisibilityChipMenu/VisibilityChipMenu.tsx @@ -2,7 +2,7 @@ import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown'; import { Theme } from '@mui/material'; import { MouseEvent, useState } from 'react'; import { Button, Menu, MenuItem } from '../../base'; -import { iconSmall } from '../../constants/iconsSizes'; +import { iconXSmall } from '../../constants/iconsSizes'; import { ALICE_BLUE, CHINESE_SILVER, NOT_FOUND, styled } from '../../theme'; interface VisibilityChipMenuProps { @@ -43,8 +43,9 @@ const StyledButton = styled(Button)(() => ({ })); const StyledDiv = styled('div')(({ theme, enabled }: { theme?: Theme; enabled: boolean }) => ({ - paddingLeft: '0.5rem', - paddingRight: enabled ? '0' : '0.5rem', + paddingLeft: '0.3rem', + height: '1.5rem', + paddingRight: enabled ? '0' : '0.3rem', borderRadius: '0.25rem', border: `1px solid ${NOT_FOUND}`, background: @@ -55,7 +56,7 @@ const StyledDiv = styled('div')(({ theme, enabled }: { theme?: Theme; enabled: b display: 'flex', justifyContent: 'center', alignItems: 'center', - width: '4.5rem', + width: '3.8rem', fontSize: '0.75rem', fontFamily: theme?.typography.fontFamily })); @@ -99,8 +100,8 @@ const VisibilityChipMenu: React.FC = ({ data-testid={`design-visibility-${value.toLowerCase()}`} > - {value} - {enabled && } + {value} + {enabled && }