From 72de88dbd4d9bf5d81e7afb9e93d397ddf2c32ce Mon Sep 17 00:00:00 2001 From: Jonathan Neuteboom <--global> Date: Sun, 23 Jun 2024 10:54:00 +0200 Subject: [PATCH] Add crop icon --- src/components/Icon.tsx | 2 +- src/components/Lightbox.tsx | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/components/Icon.tsx b/src/components/Icon.tsx index 1a038f1..ed5f395 100644 --- a/src/components/Icon.tsx +++ b/src/components/Icon.tsx @@ -24,7 +24,7 @@ export const Icon = ({ name, color, size, testID, style, rotation }: IconProps): const icon = iconStyle === 'light' ? Icons[name].light : Icons[name].solid const iconColor = color ?? theme.color.primary const iconSize = size ?? theme.icon.size.large - const transform = rotation ? { rotate: 42 } : undefined + const transform = rotation ? { rotate: rotation } : undefined return } diff --git a/src/components/Lightbox.tsx b/src/components/Lightbox.tsx index d0db34d..417cee0 100644 --- a/src/components/Lightbox.tsx +++ b/src/components/Lightbox.tsx @@ -42,6 +42,7 @@ const getLightboxFooterComponent = content?: React.ReactNode, style?: LightboxStyle, onPressDelete?: () => void, + onPressCrop?: () => void, ) => () => ( @@ -57,15 +58,23 @@ const getLightboxFooterComponent = )} {content && {content}} - {onPressDelete && ( - + + + {onPressDelete && ( - - )} + )} + {onPressCrop && ( + + + + + + )} + )