From a6fb52cd86dfb72825d552821c02d5dc91c3d1bc Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sat, 8 Jun 2024 15:20:02 +0200 Subject: [PATCH] chore: allow ShipFitExtended to be used for preview (#148) This shows everything except name + history --- .../ShipFitExtended.module.css | 3 +++ .../ShipFitExtended/ShipFitExtended.tsx | 20 +++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/components/ShipFitExtended/ShipFitExtended.module.css b/src/components/ShipFitExtended/ShipFitExtended.module.css index 067dbad..422fa93 100644 --- a/src/components/ShipFitExtended/ShipFitExtended.module.css +++ b/src/components/ShipFitExtended/ShipFitExtended.module.css @@ -7,6 +7,9 @@ position: relative; width: 100%; } +.fitPreview { + padding-bottom: 0; +} .fitName { top: 35px; diff --git a/src/components/ShipFitExtended/ShipFitExtended.tsx b/src/components/ShipFitExtended/ShipFitExtended.tsx index 8f29fcf..ec4aedf 100644 --- a/src/components/ShipFitExtended/ShipFitExtended.tsx +++ b/src/components/ShipFitExtended/ShipFitExtended.tsx @@ -143,25 +143,29 @@ const FitName = () => { * also adds the cargo hold, drone bay, and CPU/PG usage at the * bottom of the fit. */ -export const ShipFitExtended = () => { +export const ShipFitExtended = (props: { isPreview?: boolean }) => { const currentFit = useCurrentFit(); return ( -
+
-
- -
+ {props.isPreview !== true && ( +
+ +
+ )}
-
- -
+ {props.isPreview !== true && ( +
+ +
+ )}