From 59a557541712bc72d61861b4e6b62254ff554a4c Mon Sep 17 00:00:00 2001 From: Florian Sommariva Date: Thu, 27 Jul 2023 09:58:08 +0200 Subject: [PATCH] Improve spaces between section details (ui) --- .../src/components/pages/details/Details.tsx | 36 ++++++++----------- .../DetailsSection/DetailsSection.tsx | 18 ++-------- 2 files changed, 18 insertions(+), 36 deletions(-) diff --git a/frontend/src/components/pages/details/Details.tsx b/frontend/src/components/pages/details/Details.tsx index a73b7a333..047497a81 100644 --- a/frontend/src/components/pages/details/Details.tsx +++ b/frontend/src/components/pages/details/Details.tsx @@ -353,27 +353,21 @@ export const DetailsUIWithoutContext: React.FC = ({ slug, parentId, langu titleId="details.recommandations" className={marginDetailsChild} > - {details.advice !== null && details.advice.length > 0 && ( - - )} - {details.gear !== null && ( - - )} - {details.labels.map((label, i) => ( - - ))} +
+ {details.advice !== null && details.advice.length > 0 && ( + + )} + {details.gear !== null && } + {details.labels.map(label => ( + + ))} +
)} diff --git a/frontend/src/components/pages/details/components/DetailsSection/DetailsSection.tsx b/frontend/src/components/pages/details/components/DetailsSection/DetailsSection.tsx index 9cbe1b65a..0e271752b 100644 --- a/frontend/src/components/pages/details/components/DetailsSection/DetailsSection.tsx +++ b/frontend/src/components/pages/details/components/DetailsSection/DetailsSection.tsx @@ -1,8 +1,6 @@ import { Separator } from 'components/Separator'; import { FormattedMessage } from 'react-intl'; import { cn } from 'services/utils/cn'; -import styled from 'styled-components'; -import { scrollBar } from 'stylesheet'; export interface DetailsSectionProps { titleId?: string; @@ -19,12 +17,13 @@ export const DetailsSection: React.FC = ({ }) => { return (
- {titleId !== undefined && ( @@ -39,19 +38,8 @@ export const DetailsSection: React.FC = ({ > {children}
- + ); }; - -const ScrollContainer = styled.div` - &::-webkit-scrollbar { - ${scrollBar.root} - } - &::-webkit-scrollbar-thumb { - ${scrollBar.thumb} - } - max-width: 100%; - overflow-x: auto; -`;