From 7be8d733326148a1d23d63e34696c07a7a45c7a1 Mon Sep 17 00:00:00 2001 From: Michael Taylor Date: Wed, 13 Sep 2023 10:40:05 -0400 Subject: [PATCH] fix: missing colors --- src/components/blocks/ComponentRepeater.js | 2 +- src/components/forms/FormikRepeater.js | 1 + src/components/forms/UnitDetailsForm.js | 11 ++++--- src/components/forms/UnitLabelForm.js | 35 ++++++++++++++-------- src/components/icons/EllipseIcon.js | 2 +- src/components/typography/Link.js | 6 ++-- 6 files changed, 36 insertions(+), 21 deletions(-) diff --git a/src/components/blocks/ComponentRepeater.js b/src/components/blocks/ComponentRepeater.js index 585acfb1..9457fa1c 100644 --- a/src/components/blocks/ComponentRepeater.js +++ b/src/components/blocks/ComponentRepeater.js @@ -77,7 +77,7 @@ const ComponentRepeater = ({ {addIcon && values.length < maxRepetitions && ( {addIcon} - + {useToolTip && ( diff --git a/src/components/forms/FormikRepeater.js b/src/components/forms/FormikRepeater.js index 34d48043..b27d766e 100644 --- a/src/components/forms/FormikRepeater.js +++ b/src/components/forms/FormikRepeater.js @@ -21,6 +21,7 @@ const StyledRepeatedComponentContainer = styled('div')` align-items: center; gap: 10px; margin: 20px 0; + color: #6e7d7f; ${props => !props.disabled && `cursor: pointer;`}; `; diff --git a/src/components/forms/UnitDetailsForm.js b/src/components/forms/UnitDetailsForm.js index 8916e93f..22337c8d 100644 --- a/src/components/forms/UnitDetailsForm.js +++ b/src/components/forms/UnitDetailsForm.js @@ -55,10 +55,13 @@ const UnitDetailsForm = ({ noUnitCount = false }) => { const projectsSelectOptions = useMemo(() => { if (myProjects) { - return myProjects.map(projectItem => ({ - value: projectItem, - label: projectItem.projectName, - })); + console.log('@@@@', myProjects); + return ( + myProjects?.map(projectItem => ({ + value: projectItem, + label: projectItem.projectName, + })) || [] + ); } return []; }, [myProjects]); diff --git a/src/components/forms/UnitLabelForm.js b/src/components/forms/UnitLabelForm.js index 979c3fa4..e300ed41 100644 --- a/src/components/forms/UnitLabelForm.js +++ b/src/components/forms/UnitLabelForm.js @@ -123,7 +123,7 @@ const UnitLabelForm = memo( const projectsSelectOptions = useMemo(() => { if (myProjects?.length > 0) { - return myProjects.reduce((accumulator, project) => { + return myProjects?.reduce((accumulator, project) => { if (project?.labels?.length > 0) { const optionsForTheCurrentProject = project.labels.map(label => ({ value: label.id, @@ -201,7 +201,8 @@ const UnitLabelForm = memo( + })} + > @@ -242,7 +243,8 @@ const UnitLabelForm = memo( + })} + > @@ -283,7 +285,8 @@ const UnitLabelForm = memo( + })} + > @@ -330,7 +333,8 @@ const UnitLabelForm = memo( + })} + > @@ -370,7 +374,8 @@ const UnitLabelForm = memo( + })} + > @@ -405,7 +410,8 @@ const UnitLabelForm = memo( + })} + > @@ -444,7 +450,8 @@ const UnitLabelForm = memo( + })} + > @@ -480,7 +487,8 @@ const UnitLabelForm = memo( + })} + > @@ -516,7 +524,8 @@ const UnitLabelForm = memo( + })} + > @@ -554,7 +563,8 @@ const UnitLabelForm = memo( + })} + > @@ -590,7 +600,8 @@ const UnitLabelForm = memo( + })} + > diff --git a/src/components/icons/EllipseIcon.js b/src/components/icons/EllipseIcon.js index 0f254e93..53b80014 100644 --- a/src/components/icons/EllipseIcon.js +++ b/src/components/icons/EllipseIcon.js @@ -1,7 +1,7 @@ import React from 'react'; import { withTheme } from 'styled-components'; -const EllipseIcon = withTheme(({ width, height, fill }) => { +const EllipseIcon = withTheme(({ width, height, fill = '#6e7d7f' }) => { return ( props.theme.colors.default.secondary}; + color: ${props => props.color || props.theme.colors.default.secondary}; :hover { color: ${props => props.theme.colors.default.secondaryDark}; } `; -const Link = ({ children }) => { +const Link = ({ children, color = '#6e7d7f' }) => { return ( - {children} + {children} ); };