From 3fbeda24822ed62dfd0b2d24d52baa2f8ba6f5aa Mon Sep 17 00:00:00 2001 From: Rebecca Dumazert <44778533+rebeccadumazert@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:25:21 +0100 Subject: [PATCH] feat(dashboard): update dashboard card (#49) --- front/src/constants.ts | 1 + front/src/custom-style.css | 5 ++++ .../providers/connectedSpaces/Dashboard.tsx | 30 ++++++++++++++----- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/front/src/constants.ts b/front/src/constants.ts index cc70731..b52f3eb 100644 --- a/front/src/constants.ts +++ b/front/src/constants.ts @@ -5,4 +5,5 @@ export const COLORS = { cardBackground: fr.colors.decisions.background.default.grey.hover, titleColor: fr.colors.decisions.text.title.blueFrance.default, buttonBackground: fr.colors.decisions.background.default.grey.default, + textColorGrey: fr.colors.decisions.text.mention.grey.default, }; diff --git a/front/src/custom-style.css b/front/src/custom-style.css index 863ba88..4862638 100644 --- a/front/src/custom-style.css +++ b/front/src/custom-style.css @@ -9,3 +9,8 @@ .fr-icon-github-fill { border: 1px solid var(--border-default-grey); } + +/* DELETE UNNECESSARY DIV IN THE DSFR CARD COMPONENT */ +.fr-card__end{ + display: none; +} diff --git a/front/src/providers/connectedSpaces/Dashboard.tsx b/front/src/providers/connectedSpaces/Dashboard.tsx index c39798f..386c0ff 100644 --- a/front/src/providers/connectedSpaces/Dashboard.tsx +++ b/front/src/providers/connectedSpaces/Dashboard.tsx @@ -3,32 +3,46 @@ import Title1 from '../../titles/Title1'; import { Card } from '@codegouvfr/react-dsfr/Card'; import { useRouteLoaderData } from 'react-router-dom'; import { OidcClients } from '../../types'; +import { COLORS } from '../../constants'; export const Dashboard = () => { const oidcClients = useRouteLoaderData('dashboard') as OidcClients; + const keys = 'Clés de test'; return (
Tableau de bord
{oidcClients.map((oidcClient) => ( -
+
-
  • - Clés de test - DINUM -
  • - + <> +
      +
    • + {keys.includes('test') ? ( + + Clés de test + + ) : ( + {keys} + )} +
    • +
    +

    + → DINUM +

    + } title={oidcClient.clientName} titleAs="h2"