Skip to content

Commit

Permalink
Changed icon colour of community settings icon
Browse files Browse the repository at this point in the history
- Added default colour to icon prop
  • Loading branch information
mbeps committed Mar 15, 2023
1 parent 9527db9 commit 1b9743f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/components/Community/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ export const CommunitySettings: React.FC<CommunitySettingsProps> = ({
icon={FiSettings}
fontSize={20}
onClick={() => setCommunitySettingsModalOpen(true)}
iconColor="gray.500"
/>
</>
)}
Expand Down
10 changes: 8 additions & 2 deletions src/components/atoms/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type IconProps = {
icon: IconType;
fontSize: number;
onClick?: () => void;
iconColor?: string;
};

/**
Expand All @@ -23,7 +24,12 @@ type IconProps = {
*
* @returns {React.FC<IconProps>} - Icon with a hover effect
*/
const IconItem: React.FC<IconProps> = ({ icon, fontSize, onClick }) => {
const IconItem: React.FC<IconProps> = ({
icon,
fontSize,
onClick,
iconColor = "black",
}) => {
return (
<Flex
mr={1.5}
Expand All @@ -36,7 +42,7 @@ const IconItem: React.FC<IconProps> = ({ icon, fontSize, onClick }) => {
}}
onClick={onClick}
>
<Icon as={icon} fontSize={fontSize} />
<Icon as={icon} fontSize={fontSize} color={iconColor} />
</Flex>
);
};
Expand Down

0 comments on commit 1b9743f

Please sign in to comment.