Skip to content

Commit 1e35f98

Browse files
committed
front: fix projected train icon when ellipsis
Signed-off-by: romainvalls <romain.valls95@gmail.com>
1 parent 4e2a676 commit 1e35f98

File tree

2 files changed

+32
-23
lines changed

2 files changed

+32
-23
lines changed

front/src/modules/trainschedule/components/Timetable/TimetableTrainCard.tsx

+8-6
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,14 @@ const TimetableTrainCard = ({
178178
/>
179179
</div>
180180
<div title={train.trainName} className="checkbox-label">
181-
{projectionPathIsUsed && (
182-
<div className="train-projected">
183-
<Manchette iconColor="var(--white100)" />
184-
</div>
185-
)}
186-
{train.trainName}
181+
<div className="train-info">
182+
{projectionPathIsUsed && (
183+
<div className="train-projected">
184+
<Manchette iconColor="var(--white100)" />
185+
</div>
186+
)}
187+
<span className="train-name">{train.trainName}</span>
188+
</div>
187189
</div>
188190
</div>
189191
<div className="rolling-stock">

front/src/styles/scss/applications/operationalStudies/_scenario.scss

+24-17
Original file line numberDiff line numberDiff line change
@@ -356,23 +356,30 @@
356356
font-size: 1rem;
357357
font-weight: 600;
358358
max-width: 160px;
359-
white-space: nowrap;
360-
overflow: hidden;
361-
text-overflow: ellipsis;
362-
display: flex;
363-
align-items: center;
364-
.train-projected {
365-
height: 20px;
366-
width: 20px;
367-
margin-right: 6px;
368-
background-color: var(--info30);
369-
border-radius: 4px;
370-
position: relative;
371-
svg {
372-
position: absolute;
373-
top: 0;
374-
left: 0;
375-
transform: translate(2px, 2px);
359+
360+
.train-info {
361+
display: flex;
362+
align-items: center;
363+
min-width: 0;
364+
.train-projected {
365+
height: 20px;
366+
width: 20px;
367+
margin-right: 6px;
368+
background-color: var(--info30);
369+
border-radius: 4px;
370+
position: relative;
371+
flex-shrink: 0;
372+
svg {
373+
position: absolute;
374+
top: 0;
375+
left: 0;
376+
transform: translate(2px, 2px);
377+
}
378+
}
379+
.train-name {
380+
overflow: hidden;
381+
text-overflow: ellipsis;
382+
white-space: nowrap;
376383
}
377384
}
378385
}

0 commit comments

Comments
 (0)