Parcourir la source

Bugfix: isCustomPadding prop added for PageContainer component.

lfabl il y a 1 mois
Parent
commit
fd6dfb4759

+ 5 - 2
src/components/pageContainer/index.tsx

@@ -19,6 +19,7 @@ const PageContainer: FC<IPageContainerProps> = ({
     backgroundColor = "default" as keyof NCoreUIKit.ContainerContentColors,
     isWrapSafeareaContext = false,
     safeAreaViewBackgroundColor,
+    isCustomPadding = false,
     isScrollable = false,
     safeAreaViewStyle,
     scrollViewStyle,
@@ -47,7 +48,7 @@ const PageContainer: FC<IPageContainerProps> = ({
             keyboardShouldPersistTaps="handled"
             {...scrollViewProps}
             contentContainerStyle={[
-                {
+                isCustomPadding ? null : {
                     padding: spaces.spacingMd
                 },
                 scrollViewProps?.contentContainerStyle
@@ -77,7 +78,9 @@ const PageContainer: FC<IPageContainerProps> = ({
             {...props}
             style={[
                 {
-                    backgroundColor: colors.content.container[backgroundColor],
+                    backgroundColor: colors.content.container[backgroundColor]
+                },
+                isCustomPadding ? null : {
                     padding: spaces.spacingMd
                 },
                 stylesheet.container,

+ 1 - 0
src/components/pageContainer/type.ts

@@ -16,6 +16,7 @@ interface IPageContainerProps {
     renderOverlays?: () => ReactNode;
     isWrapSafeareaContext?: boolean;
     style?: StyleProp<ViewStyle>;
+    isCustomPadding?: boolean;
     isScrollable?: boolean;
     children?: ReactNode;
     customTheme?: {