Skip to content

Commit

Permalink
fix: missing colors
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Sep 13, 2023
1 parent 13c8c5f commit 7be8d73
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/components/blocks/ComponentRepeater.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const ComponentRepeater = ({
{addIcon && values.length < maxRepetitions && (
<StyledRepeatedComponentContainer onClick={addNewInstance}>
{addIcon}
<Body color="#1890ff">
<Body color="#6e7d7f">
<FormattedMessage id="click-to-add" />
{useToolTip && (
<ToolTipContainer tooltip={useToolTip}>
Expand Down
1 change: 1 addition & 0 deletions src/components/forms/FormikRepeater.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const StyledRepeatedComponentContainer = styled('div')`
align-items: center;
gap: 10px;
margin: 20px 0;
color: #6e7d7f;
${props => !props.disabled && `cursor: pointer;`};
`;

Expand Down
11 changes: 7 additions & 4 deletions src/components/forms/UnitDetailsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
35 changes: 23 additions & 12 deletions src/components/forms/UnitLabelForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -201,7 +201,8 @@ const UnitLabelForm = memo(
<ToolTipContainer
tooltip={intl.formatMessage({
id: 'way-to-add-label',
})}>
})}
>
<DescriptionIcon height="14" width="14" />
</ToolTipContainer>
</Body>
Expand Down Expand Up @@ -242,7 +243,8 @@ const UnitLabelForm = memo(
<ToolTipContainer
tooltip={intl.formatMessage({
id: 'select-existing-label',
})}>
})}
>
<DescriptionIcon height="14" width="14" />
</ToolTipContainer>
</Body>
Expand Down Expand Up @@ -283,7 +285,8 @@ const UnitLabelForm = memo(
<ToolTipContainer
tooltip={intl.formatMessage({
id: 'select-label-by-project',
})}>
})}
>
<DescriptionIcon height="14" width="14" />
</ToolTipContainer>
</Body>
Expand Down Expand Up @@ -330,7 +333,8 @@ const UnitLabelForm = memo(
<ToolTipContainer
tooltip={intl.formatMessage({
id: 'labels-label-description',
})}>
})}
>
<DescriptionIcon height="14" width="14" />
</ToolTipContainer>
</Body>
Expand Down Expand Up @@ -370,7 +374,8 @@ const UnitLabelForm = memo(
<ToolTipContainer
tooltip={intl.formatMessage({
id: 'labels-label-type-description',
})}>
})}
>
<DescriptionIcon height="14" width="14" />
</ToolTipContainer>
</Body>
Expand Down Expand Up @@ -405,7 +410,8 @@ const UnitLabelForm = memo(
<ToolTipContainer
tooltip={intl.formatMessage({
id: 'labels-label-link-description',
})}>
})}
>
<DescriptionIcon height="14" width="14" />
</ToolTipContainer>
</Body>
Expand Down Expand Up @@ -444,7 +450,8 @@ const UnitLabelForm = memo(
<ToolTipContainer
tooltip={intl.formatMessage({
id: 'labels-validity-period-start-date-description',
})}>
})}
>
<DescriptionIcon height="14" width="14" />
</ToolTipContainer>
</Body>
Expand Down Expand Up @@ -480,7 +487,8 @@ const UnitLabelForm = memo(
<ToolTipContainer
tooltip={intl.formatMessage({
id: 'labels-validity-period-end-date-description',
})}>
})}
>
<DescriptionIcon height="14" width="14" />
</ToolTipContainer>
</Body>
Expand Down Expand Up @@ -516,7 +524,8 @@ const UnitLabelForm = memo(
<ToolTipContainer
tooltip={intl.formatMessage({
id: 'labels-crediting-period-start-date-description',
})}>
})}
>
<DescriptionIcon height="14" width="14" />
</ToolTipContainer>
</Body>
Expand Down Expand Up @@ -554,7 +563,8 @@ const UnitLabelForm = memo(
<ToolTipContainer
tooltip={intl.formatMessage({
id: 'labels-crediting-period-end-date-description',
})}>
})}
>
<DescriptionIcon height="14" width="14" />
</ToolTipContainer>
</Body>
Expand Down Expand Up @@ -590,7 +600,8 @@ const UnitLabelForm = memo(
<ToolTipContainer
tooltip={intl.formatMessage({
id: 'labels-unit-quantity-description',
})}>
})}
>
<DescriptionIcon height="14" width="14" />
</ToolTipContainer>
</Body>
Expand Down
2 changes: 1 addition & 1 deletion src/components/icons/EllipseIcon.js
Original file line number Diff line number Diff line change
@@ -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 (
<svg
width={`${width}px`}
Expand Down
6 changes: 3 additions & 3 deletions src/components/typography/Link.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import styled from 'styled-components';
import { Body } from '../../components';

const StyledLink = styled('div')`
color: ${props => 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 (
<Body>
<StyledLink>{children}</StyledLink>
<StyledLink color={color}>{children}</StyledLink>
</Body>
);
};
Expand Down

0 comments on commit 7be8d73

Please sign in to comment.