From 1b7a032a1278f3b23a6c42aec8f0fcc2a5f05ed0 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sun, 17 Dec 2023 13:22:54 -0600 Subject: [PATCH] Finalize refactor --- src/camera/CameraHeader.tsx | 2 +- src/camera/PhotoCamera.tsx | 9 ++++++--- src/components/Badge.tsx | 11 ++++++----- src/components/EntityLink.tsx | 5 +++-- src/components/HeaderList.tsx | 21 +++++++++++---------- src/photo/PhotoLarge.tsx | 2 +- src/photo/PhotoSetHeader.tsx | 9 +++++---- src/tag/PhotoTag.tsx | 6 +----- 8 files changed, 34 insertions(+), 31 deletions(-) diff --git a/src/camera/CameraHeader.tsx b/src/camera/CameraHeader.tsx index 1dd26742..657c0e5a 100644 --- a/src/camera/CameraHeader.tsx +++ b/src/camera/CameraHeader.tsx @@ -21,7 +21,7 @@ export default function CameraHeader({ const camera = cameraFromPhoto(photos[0], cameraProp); return ( } + entity={} entityVerb="Photo" entityDescription={ descriptionForCameraPhotos(photos, undefined, count, dateRange)} diff --git a/src/camera/PhotoCamera.tsx b/src/camera/PhotoCamera.tsx index aeabc85d..82d6cad3 100644 --- a/src/camera/PhotoCamera.tsx +++ b/src/camera/PhotoCamera.tsx @@ -32,13 +32,16 @@ export default function PhotoCamera({ title="Apple" className={cc( 'text-icon', - 'translate-x-[-2.5px] translate-y-[-1.5px]', + 'translate-x-[-2.5px] translate-y-[2px]', )} - size={14} + size={15} /> : } type={showAppleIcon && isCameraApple ? 'icon-first' : type} badged={badged} diff --git a/src/components/Badge.tsx b/src/components/Badge.tsx index 358f8b2b..ae9d2462 100644 --- a/src/components/Badge.tsx +++ b/src/components/Badge.tsx @@ -11,16 +11,16 @@ export default function Badge({ uppercase?: boolean interactive?: boolean }) { - const coreStyles = () => { + const stylesForType = () => { switch (type) { case 'primary': return cc( - 'px-1.5 py-[0.3rem] leading-none rounded-md', + 'px-1.5 py-[0.3rem] rounded-md', 'bg-gray-100/80 dark:bg-gray-900/80', 'border border-gray-200/60 dark:border-gray-800/75' ); case 'secondary': return cc( - 'px-[0.3rem] py-1 leading-none rounded-[0.25rem]', - 'bg-gray-100 dark:bg-gray-800/60', + 'px-[0.3rem] py-1 rounded-[0.25rem]', + 'bg-gray-300/30 dark:bg-gray-700/50', 'text-medium', 'font-medium text-[0.7rem]', interactive && 'hover:text-gray-900 dark:hover:text-gray-100', @@ -30,7 +30,8 @@ export default function Badge({ }; return ( {children} diff --git a/src/components/EntityLink.tsx b/src/components/EntityLink.tsx index 3696906c..6633eb30 100644 --- a/src/components/EntityLink.tsx +++ b/src/components/EntityLink.tsx @@ -60,9 +60,10 @@ export default function EntityLink({ } {icon && type !== 'text-only' && {icon} } diff --git a/src/components/HeaderList.tsx b/src/components/HeaderList.tsx index e5f32184..d0256a95 100644 --- a/src/components/HeaderList.tsx +++ b/src/components/HeaderList.tsx @@ -20,20 +20,21 @@ export default function HeaderList({ duration={0.5} staggerDelay={0.05} items={(title || icon - ? [ -
- {icon && - - {icon} - } - {title} -
, - ] + )} + > + {icon && + + {icon} + } + {title} + ] :[] as ReactNode[] ).concat(items)} classNameItem="text-dim uppercase" diff --git a/src/photo/PhotoLarge.tsx b/src/photo/PhotoLarge.tsx index 331c18ee..f66deb59 100644 --- a/src/photo/PhotoLarge.tsx +++ b/src/photo/PhotoLarge.tsx @@ -69,7 +69,7 @@ export default function PhotoLarge({ 'mb-4', )}> {renderMiniGrid(<> -
+
- + {entity} } type={type} badged={badged}