Skip to content

Commit

Permalink
Affiche les boutons pour restreindre les fiches dans la page plan et …
Browse files Browse the repository at this point in the history
…les configure en disable
  • Loading branch information
Arthur Molinos committed Oct 26, 2023
1 parent be9eba1 commit c1098af
Showing 1 changed file with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import RestreindreFichesModal from './RestreindreFichesModal';
import IconLockFill from 'ui/shared/designSystem/icons/IconLockFill';
import IconUnlockFill from 'ui/shared/designSystem/icons/IconUnlockFill';
import DSTetTooltip from 'ui/shared/floating-ui/DSTetTooltip';
import classNames from 'classnames';

type TPlanActionHeader = {
collectivite_id: number;
Expand Down Expand Up @@ -94,14 +95,14 @@ const PlanActionHeader = ({
}
/>
</SupprimerAxeModal>
{!isAxePage && axeHasFiches && (
{!isAxePage && (
<>
<RestreindreFichesModal
planId={plan.id}
axes={axes}
restreindre={false}
>
<button>
<button disabled={!axeHasFiches}>
<DSTetTooltip
placement="bottom"
label={() => (
Expand All @@ -111,7 +112,11 @@ const PlanActionHeader = ({
)}
>
<div className="fr-btn fr-btn--tertiary fr-btn--sm !p-2">
<IconUnlockFill className="h-4 w-4 fill-success-1" />
<IconUnlockFill
className={classNames('h-4 w-4 fill-success-1', {
'fill-grey-5': !axeHasFiches,
})}
/>
</div>
</DSTetTooltip>
</button>
Expand All @@ -121,7 +126,7 @@ const PlanActionHeader = ({
axes={axes}
restreindre
>
<button>
<button disabled={!axeHasFiches}>
<DSTetTooltip
placement="bottom"
label={() => (
Expand All @@ -131,7 +136,11 @@ const PlanActionHeader = ({
)}
>
<div className="fr-btn fr-btn--tertiary fr-btn--sm !p-2">
<IconLockFill className="h-4 w-4 fill-principale" />
<IconLockFill
className={classNames('h-4 w-4 fill-principale', {
'fill-grey-5': !axeHasFiches,
})}
/>
</div>
</DSTetTooltip>
</button>
Expand Down

0 comments on commit c1098af

Please sign in to comment.