Skip to content

Commit 1cb5414

Browse files
committed
fixup! front: Change display when description is too long
1 parent 8a98f03 commit 1cb5414

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

front/src/applications/operationalStudies/components/Scenario/ScenarioDescription.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ const ScenarioDescription = ({
5959
<div ref={ref} className="scenario-description">
6060
{scenario.description && (
6161
<div
62-
title={!isOpenedDescription ? scenario.description : ''}
62+
title={isOpenedDescription ? '' : scenario.description}
6363
className={`scenario-details-description ${isOpenedDescription ? 'opened' : 'not-opened'}`}
64-
style={{ width: !isOpenedDescription ? width : width + 120 }}
64+
style={{ width: isOpenedDescription ? width + 120 : width }}
6565
>
6666
{scenario.description}
6767
<span
@@ -70,7 +70,7 @@ const ScenarioDescription = ({
7070
tabIndex={0}
7171
className={isOpenedDescription ? 'displayed-description' : 'display-description'}
7272
>
73-
{!isOpenedDescription ? '(plus)' : <X />}
73+
{isOpenedDescription ? <X /> : '(plus)'}
7474
</span>
7575
</div>
7676
)}

0 commit comments

Comments
 (0)