Selaa lähdekoodia

Bugfix: bgcolor problem fixedi in Page Container component.

lfabl 2 kuukautta sitten
vanhempi
commit
dc1d08d8d0
1 muutettua tiedostoa jossa 7 lisäystä ja 6 poistoa
  1. 7 6
      src/components/pageContainer/index.tsx

+ 7 - 6
src/components/pageContainer/index.tsx

@@ -21,16 +21,17 @@ const PageContainer: FC<IPageContainerProps> = ({
     ...props
 }) => {
     const {
+        colors,
         spaces
     } = NCoreUIKitTheme.useContext();
 
     const renderScrollview = () => {
         if(style) {
-            console.log("Hey!. You make wrong things. If you must be use isScrollable={true}, you must be use scrollViewStyle. Do not use style prop for this case.");
+            console.error("Hey!. You make wrong things. If you must be use isScrollable={true}, you must be use scrollViewStyle. Do not use style prop for this case.");
         }
 
         if(props) {
-            console.log("Hey!. You make wrong things. If you must be use isScrollable={true}, you must be use scrollViewProps. Do not use default view props for this case.");
+            console.error("Hey!. You make wrong things. If you must be use isScrollable={true}, you must be use scrollViewProps. Do not use default view props for this case.");
         }
 
         return <ScrollView
@@ -43,7 +44,7 @@ const PageContainer: FC<IPageContainerProps> = ({
             ]}
             style={[
                 {
-                    backgroundColor: backgroundColor
+                    backgroundColor: colors.content.container[backgroundColor]
                 },
                 stylesheet.container,
                 scrollViewStyle
@@ -55,18 +56,18 @@ const PageContainer: FC<IPageContainerProps> = ({
 
     const renderView = () => {
         if(scrollViewStyle) {
-            console.log("Hey!. You make wrong things. If you must be use isScrollable={false}, you must be use style. Do not use scrollViewStyle prop for this case.");
+            console.error("Hey!. You make wrong things. If you must be use isScrollable={false}, you must be use style. Do not use scrollViewStyle prop for this case.");
         }
 
         if(scrollViewProps) {
-            console.log("Hey!. You make wrong things. If you must be use isScrollable={false}, you musn't use scrollViewProps.");
+            console.error("Hey!. You make wrong things. If you must be use isScrollable={false}, you musn't use scrollViewProps.");
         }
 
         return <View
             {...props}
             style={[
                 {
-                    backgroundColor: backgroundColor,
+                    backgroundColor: colors.content.container[backgroundColor],
                     padding: spaces.spacingMd
                 },
                 stylesheet.container,