diff --git a/src/components/common/BusinessCardContainer/index.tsx b/src/components/common/BusinessCardContainer/index.tsx index ee5cd766..104b1e40 100644 --- a/src/components/common/BusinessCardContainer/index.tsx +++ b/src/components/common/BusinessCardContainer/index.tsx @@ -108,6 +108,7 @@ const CameraIcon = styled.img` width: 38px; height: 38px; ` + const UploadLabel = styled.label` cursor: pointer; ` diff --git a/src/components/common/CustomSelectorButton/index.tsx b/src/components/common/CustomSelectorButton/index.tsx index 2c11bcff..d2e5cab7 100644 --- a/src/components/common/CustomSelectorButton/index.tsx +++ b/src/components/common/CustomSelectorButton/index.tsx @@ -7,19 +7,19 @@ import { palette } from '@/styles/palette' type CustomSelectorButtonProps = { isDarkMode: boolean buttonName: string - onClick: (selected: boolean) => void + isButtonClicked: (selected: boolean) => void onRemove: () => void - isButtonselected: boolean - maxLengthReached: boolean + isButtonSelected: boolean + isMaxLengthReached: boolean } const CustomSelectorButton = ({ isDarkMode, buttonName, - onClick, + isButtonClicked, onRemove, - isButtonselected: propIsButtonSelected, - maxLengthReached, + isButtonSelected: propIsButtonSelected, + isMaxLengthReached, }: CustomSelectorButtonProps) => { const defaultSettings = isDarkMode ? { @@ -40,12 +40,12 @@ const CustomSelectorButton = ({ }, [propIsButtonSelected]) const handleButtonClick = () => { - if (maxLengthReached && !isButtonSelected) { - onClick && onClick(true) + if (isMaxLengthReached && !isButtonSelected) { + isButtonClicked && isButtonClicked(true) return } setIsButtonSelected((prevState) => !prevState) - if (onClick) onClick(!isButtonSelected) + if (isButtonClicked) isButtonClicked(!isButtonSelected) } return ( @@ -61,7 +61,7 @@ const CustomSelectorButton = ({ > {buttonName} - + - + ) } @@ -83,7 +83,7 @@ const StyledButtonWrapper = styled.div` align-items: center; ` -const RemoveButton = styled.button` +const StyledRemoveButton = styled.button` margin-left: 8px; background-color: transparent; border: none; diff --git a/src/components/common/SelectorButtonContainer/index.tsx b/src/components/common/SelectorButtonContainer/index.tsx index 26d7c2b5..1e04d1b2 100644 --- a/src/components/common/SelectorButtonContainer/index.tsx +++ b/src/components/common/SelectorButtonContainer/index.tsx @@ -65,10 +65,10 @@ const SelectorButtonContainer = ({ key={index} isDarkMode={isDarkMode} buttonName={name} - onClick={(isSelected) => handleCustomButtonClick(isSelected)} + isButtonClicked={(isSelected) => handleCustomButtonClick(isSelected)} onRemove={() => handleCustomButtonRemove(name)} - maxLengthReached={selectedCount >= maxLength} - isButtonselected={false} + isMaxLengthReached={selectedCount >= maxLength} + isButtonSelected={false} /> ))} {showAlert && (