Skip to content

Commit

Permalink
front: add new icons
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahBellaha authored and Akctarus committed Jul 5, 2024
1 parent 32964e9 commit e084c99
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useEffect } from 'react';

import { useTranslation } from 'react-i18next';
import { MdSportsScore } from 'react-icons/md';
import { useSelector } from 'react-redux';

import DestinationIcon from 'assets/pictures/stdcmV2/destination.svg';
Expand Down Expand Up @@ -39,7 +38,7 @@ const StdcmDestination = ({
return (
<StdcmCard
name={t('trainPath.destination')}
title={<MdSportsScore color="blue" size="1.5rem" />}
title={<img src={DestinationIcon} alt="destination" />}
disabled={disabled}
>
<div className="stdcm-v2-destination">
Expand Down
3 changes: 1 addition & 2 deletions front/src/applications/stdcmV2/components/StdcmOrigin.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useEffect } from 'react';

import { useTranslation } from 'react-i18next';
import { MdPinDrop } from 'react-icons/md';
import { useSelector } from 'react-redux';

import OriginIcon from 'assets/pictures/stdcmV2/start.svg';
Expand Down Expand Up @@ -41,7 +40,7 @@ const StdcmOrigin = ({ setCurrentSimulationInputs, disabled = false }: StdcmConf
return (
<StdcmCard
name={t('trainPath.origin')}
title={<MdPinDrop color="blue" size="1.5rem" />}
title={<img src={OriginIcon} alt="origin" />}
disabled={disabled}
hasTip
>
Expand Down
14 changes: 9 additions & 5 deletions front/src/applications/stdcmV2/components/StdcmVias.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React, { useEffect, useMemo } from 'react';

import { Location } from '@osrd-project/ui-icons';
import { useTranslation } from 'react-i18next';
import { MdClear, MdOutlineDirections } from 'react-icons/md';
import { useSelector } from 'react-redux';

import IntermediatePointIcon from 'assets/pictures/stdcmV2/intermediate-point.svg';
import { useOsrdConfSelectors, useOsrdConfActions } from 'common/osrdContext';
import type { StdcmConfSliceActions } from 'reducers/osrdconf/stdcmConf';
import type { PathStep } from 'reducers/osrdconf/types';
Expand Down Expand Up @@ -71,9 +71,13 @@ const StdcmVias = ({
key={pathStepId}
name={t('trainPath.vias')}
title={
<div>
<MdOutlineDirections color="darkgreen" />
<MdClear color="darkred" onClick={() => deletePathStep(pathStepId)} />
<div className="stdcm-v2-via-icons">
<span>
<img src={IntermediatePointIcon} alt="intermediate-point" />
</span>
<button type="button" onClick={() => deletePathStep(pathStepId)}>
{t('translation:common.delete')}
</button>
</div>
} // TODO: Remove icon and clear button -> replace them by the "numbered point" icon
hasTip
Expand Down Expand Up @@ -102,7 +106,7 @@ const StdcmVias = ({
dispatch(updatePathSteps(addElementAtIndex(pathSteps, pathSteps.length - 1, null)));
}}
>
<span className="stdcm-v2-via-icon">
<span className="stdcm-v2-add-via-icon">
<Location size="lg" variant="base" />
</span>
<span className="stdcm-v2-add-via__button pl-3">{t('trainPath.addVia')}</span>
Expand Down

0 comments on commit e084c99

Please sign in to comment.