diff --git a/packages/code-du-travail-frontend/src/modules/stats/Resume.tsx b/packages/code-du-travail-frontend/src/modules/stats/Resume.tsx new file mode 100644 index 00000000000..9c826c9e10e --- /dev/null +++ b/packages/code-du-travail-frontend/src/modules/stats/Resume.tsx @@ -0,0 +1,27 @@ +import { Tile } from "@codegouvfr/react-dsfr/Tile"; +import { toUrl } from "../utils/url"; + +export const Resume = ({ + year, + fileName, + fileSizeMb, +}: { + year: number; + fileName: string; + fileSizeMb: number; +}) => ( + Format PDF - {fileSizeMb}Mo

} + imageAlt={""} + linkProps={{ + href: toUrl(fileName), + }} + /> +); diff --git a/packages/code-du-travail-frontend/src/modules/stats/__tests__/__snapshots__/Stats.test.tsx.snap b/packages/code-du-travail-frontend/src/modules/stats/__tests__/__snapshots__/Stats.test.tsx.snap index 87d4f4a2d22..a131cb8e7aa 100644 --- a/packages/code-du-travail-frontend/src/modules/stats/__tests__/__snapshots__/Stats.test.tsx.snap +++ b/packages/code-du-travail-frontend/src/modules/stats/__tests__/__snapshots__/Stats.test.tsx.snap @@ -134,6 +134,65 @@ exports[` should match snapshot 1`] = ` > Statistiques d’utilisation depuis le 01/01/2020

+

+ Bilans annuels +

+
+
+ +
+
diff --git a/packages/code-du-travail-frontend/src/modules/stats/index.tsx b/packages/code-du-travail-frontend/src/modules/stats/index.tsx index 1f208dd63ef..5f2f2d56cf7 100644 --- a/packages/code-du-travail-frontend/src/modules/stats/index.tsx +++ b/packages/code-du-travail-frontend/src/modules/stats/index.tsx @@ -1,5 +1,6 @@ import { fr } from "@codegouvfr/react-dsfr"; import { StatsDisplay } from "./StatsDisplay"; +import { Resume } from "./Resume"; import { css } from "@styled-system/css"; type StatsProps = { @@ -35,6 +36,12 @@ export const Stats = (props: StatsProps) => (

Statistiques d’utilisation depuis le 01/01/2020

+

Bilans annuels

+
+
+ +
+
);