From b86b1538dd776430c803961f636f9f52752073c2 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Thu, 14 Sep 2023 09:17:33 +0200 Subject: [PATCH] =?UTF-8?q?R=C3=A9pare=20l'affichage=20de=20la=20documenta?= =?UTF-8?q?tion=20sur=20le=20comparateur=20des=20statuts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #2796 --- site/package.json | 2 +- site/source/components/ui/Skeleton.tsx | 25 +++++++++++-------- .../components/Comparateur.tsx | 4 --- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/site/package.json b/site/package.json index dcfa1c859..89b7cb6dd 100644 --- a/site/package.json +++ b/site/package.json @@ -31,7 +31,7 @@ "build:sitemap": "ts-node-esm build/build-sitemap.ts", "build:ssr": "NODE_OPTIONS='--max-old-space-size=4096'; vite build --ssr ./source/entries/entry-server.tsx --outDir ./dist/ssr --emptyOutDir && echo '{\"type\": \"module\"}' > dist/package.json", "build:storybook": "NODE_OPTIONS='--max-old-space-size=6144'; storybook build", - "build:yaml-to-dts": "ts-node-esm scripts/build-yaml-to-dts.ts", + "build:yaml-to-dts": "ts-node-esm build/build-yaml-to-dts.ts", "preview:mon-entreprise": "sed 's|:SITE_EN|_|g' netlify.preview.toml | sed 's|:SITE_FR||g' | sed 's|:API_URL|http://localhost:3004|g' > dist/netlify.toml && cd dist && netlify dev -d ./ -p 8888", "preview:infrance": " sed 's|:SITE_EN||g' netlify.preview.toml | sed 's|:SITE_FR|_|g' | sed 's|:API_URL|http://localhost:3004|g' > dist/netlify.toml && cd dist && netlify dev -d ./ -p 8889", "typecheck:watch": "tsc --skipLibCheck --noEmit --watch", diff --git a/site/source/components/ui/Skeleton.tsx b/site/source/components/ui/Skeleton.tsx index 4a2fd4b34..4d8471254 100644 --- a/site/source/components/ui/Skeleton.tsx +++ b/site/source/components/ui/Skeleton.tsx @@ -1,4 +1,4 @@ -import { keyframes } from 'styled-components' +import { keyframes, styled } from 'styled-components' type SkeletonProps = { width?: number @@ -16,21 +16,24 @@ const skeletonKeyframes = keyframes` export default function Skeleton({ width, height }: SkeletonProps) { return ( - ‌ - + ) } + +const StyledSpan = styled.span` + background-color: #eee; + background-image: linear-gradient(90deg, #eee, #f5f5f5, #eee); + background-size: 200px 100%; + background-repeat: no-repeat; + border-radius: 4px; + display: inline-block; + line-height: 1; + animation: ${skeletonKeyframes} 1.2s ease-in-out infinite; +` \ No newline at end of file diff --git a/site/source/pages/simulateurs/comparaison-statuts/components/Comparateur.tsx b/site/source/pages/simulateurs/comparaison-statuts/components/Comparateur.tsx index e9f2189cf..92442e112 100644 --- a/site/source/pages/simulateurs/comparaison-statuts/components/Comparateur.tsx +++ b/site/source/pages/simulateurs/comparaison-statuts/components/Comparateur.tsx @@ -79,10 +79,6 @@ function Comparateur({ namedEngines }: { namedEngines: EngineComparison }) { -