Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Docs/2_Inbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ class CourierInboxViewManager : SimpleViewManager<CourierInbox>() {
val dividerItemDecoration = android?.getString("dividerItemDecoration")

val brandId = getString("brandId")
val backgroundColor = getString("backgroundColor")

val tabIndicatorColor = getString("tabIndicatorColor")
val tabStyle = getMap("tabStyle")
Expand All @@ -139,6 +140,7 @@ class CourierInboxViewManager : SimpleViewManager<CourierInbox>() {

return CourierInboxTheme(
brandId = brandId,
backgroundColor = backgroundColor?.toColor(),
tabIndicatorColor = tabIndicatorColor?.toColor(),
tabStyle = tabStyle?.toTabStyle(context) ?: CourierStyles.Inbox.TabStyle(
selected = CourierStyles.Inbox.TabItemStyle(
Expand Down
2 changes: 2 additions & 0 deletions ios/CourierInboxReactNativeManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(),
Expand Down
1 change: 1 addition & 0 deletions src/models/CourierInboxTheme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export interface CourierArchivingSwipeActionStyle {

export interface CourierInboxTheme {
brandId?: string;
backgroundColor?: string;
tabIndicatorColor?: string;
tabStyle?: CourierInboxTabStyle;
readingSwipeActionStyle?: CourierReadingSwipeActionStyle;
Expand Down
Loading