diff --git a/Docs/2_Inbox.md b/Docs/2_Inbox.md index b2544db..c411690 100644 --- a/Docs/2_Inbox.md +++ b/Docs/2_Inbox.md @@ -140,6 +140,7 @@ const defaultFont = Platform.OS === 'ios' ? 'Avenir Medium' : 'fonts/poppins_reg const lightTheme: CourierInboxTheme = { brandId: "your_brand_id", + backgroundColor: '#FFFFFF', tabIndicatorColor: primaryColor, tabStyle: { selected: { diff --git a/android/src/main/java/com/courierreactnative/CourierInboxViewManager.kt b/android/src/main/java/com/courierreactnative/CourierInboxViewManager.kt index b7ae44b..74e32ca 100644 --- a/android/src/main/java/com/courierreactnative/CourierInboxViewManager.kt +++ b/android/src/main/java/com/courierreactnative/CourierInboxViewManager.kt @@ -119,6 +119,7 @@ class CourierInboxViewManager : SimpleViewManager() { val dividerItemDecoration = android?.getString("dividerItemDecoration") val brandId = getString("brandId") + val backgroundColor = getString("backgroundColor") val tabIndicatorColor = getString("tabIndicatorColor") val tabStyle = getMap("tabStyle") @@ -139,6 +140,7 @@ class CourierInboxViewManager : SimpleViewManager() { return CourierInboxTheme( brandId = brandId, + backgroundColor = backgroundColor?.toColor(), tabIndicatorColor = tabIndicatorColor?.toColor(), tabStyle = tabStyle?.toTabStyle(context) ?: CourierStyles.Inbox.TabStyle( selected = CourierStyles.Inbox.TabItemStyle( diff --git a/ios/CourierInboxReactNativeManager.swift b/ios/CourierInboxReactNativeManager.swift index 93ec2b1..8c09665 100644 --- a/ios/CourierInboxReactNativeManager.swift +++ b/ios/CourierInboxReactNativeManager.swift @@ -314,6 +314,7 @@ internal extension NSDictionary { let defaultTheme = CourierInboxTheme() let brandId = self["brandId"] as? String + let backgroundColor = self["backgroundColor"] as? String let tabIndicatorColor = self["tabIndicatorColor"] as? String let tabStyle = self["tabStyle"] as? NSDictionary let readingSwipeActionStyle = self["readingSwipeActionStyle"] as? NSDictionary @@ -332,6 +333,7 @@ internal extension NSDictionary { return CourierInboxTheme( brandId: brandId, + backgroundColor: backgroundColor?.toColor(), tabIndicatorColor: tabIndicatorColor?.toColor(), tabStyle: tabStyle?.toTabStyle() ?? CourierInboxView.defaultTabStyle(), readingSwipeActionStyle: readingSwipeActionStyle?.toReadingSwipeActionStyle() ?? CourierInboxView.defaultReadingStyle(), diff --git a/src/models/CourierInboxTheme.tsx b/src/models/CourierInboxTheme.tsx index b0e2ff9..4b25338 100644 --- a/src/models/CourierInboxTheme.tsx +++ b/src/models/CourierInboxTheme.tsx @@ -48,6 +48,7 @@ export interface CourierArchivingSwipeActionStyle { export interface CourierInboxTheme { brandId?: string; + backgroundColor?: string; tabIndicatorColor?: string; tabStyle?: CourierInboxTabStyle; readingSwipeActionStyle?: CourierReadingSwipeActionStyle;