From 8855108702b8f093d7c6ce3932f7cf65682f9e26 Mon Sep 17 00:00:00 2001 From: clegirar Date: Mon, 12 Feb 2024 10:40:20 +0100 Subject: [PATCH] fix: remove LegacySecondaryBox component Signed-off-by: clegirar --- .../components/boxes/LegacySecondaryBox.tsx | 126 ------------------ 1 file changed, 126 deletions(-) delete mode 100644 packages/components/boxes/LegacySecondaryBox.tsx diff --git a/packages/components/boxes/LegacySecondaryBox.tsx b/packages/components/boxes/LegacySecondaryBox.tsx deleted file mode 100644 index 00737bb1b9..0000000000 --- a/packages/components/boxes/LegacySecondaryBox.tsx +++ /dev/null @@ -1,126 +0,0 @@ -import React, { ReactNode } from "react"; -import { View, ViewStyle, StyleProp, StyleSheet } from "react-native"; - -import { neutral11 } from "../../utils/style/colors"; - -/** - * @deprecated use SecondaryBox or Box instead - */ -export const LegacySecondaryBox: React.FC<{ - width?: number; - height?: number; - fullWidth?: boolean; - cornerWidth?: number; - squaresBackgroundColor?: string; - disabled?: boolean; - style?: StyleProp; - mainContainerStyle?: StyleProp; - noBrokenCorners?: boolean; - squaresBorderColor?: string; - children: ReactNode; -}> = ({ - width, - height, - fullWidth = false, - // Less or more big "broken" corner (Example on SocialButton) - cornerWidth = 8, - // We need that to correctly set the color under the card - squaresBackgroundColor = "#000000", - disabled = false, - style, - mainContainerStyle, - noBrokenCorners, - squaresBorderColor, - children, -}) => { - const flatMainContainerStyle = mainContainerStyle - ? StyleSheet.flatten(mainContainerStyle) - : {}; - const borderRadius = flatMainContainerStyle.borderRadius || 8; - const backgroundColor = disabled - ? neutral11 - : flatMainContainerStyle.backgroundColor || "#000000"; - - return ( - // ---- Main container, flex row to fit the horizontal content - - {/* ---- Sub main container, flex column to fit the vertical content*/} - - {/*---- Content wrapper*/} - - {/* ---- Content container */} - - <>{children} - - - {!noBrokenCorners && ( - <> - {/* Left top broken corner */} - - - {/* Right bottom broken corner */} - - - )} - - - - ); -};