diff --git a/src/BottomTabs.res b/src/BottomTabs.res index c1dca65..65195ca 100644 --- a/src/BottomTabs.res +++ b/src/BottomTabs.res @@ -18,9 +18,19 @@ module TabBarBadge = { external string: string => t = "%identity" } +type tabBarLabelArgs = { + focused: bool, + color: string, + position: tabBarLabelPosition, + children: string, +} + +@unboxed +type tabBarLabel = String(string) | Function(tabBarLabelArgs => React.element) + type rec options = { title?: string, - tabBarLabel?: string, + tabBarLabel?: tabBarLabel, tabBarShowLabel?: bool, tabBarLabelPosition?: tabBarLabelPosition, tabBarLabelStyle?: Style.t, diff --git a/src/MaterialBottomTabs.res b/src/MaterialBottomTabs.res index cda340d..721453f 100644 --- a/src/MaterialBottomTabs.res +++ b/src/MaterialBottomTabs.res @@ -16,11 +16,20 @@ module TabBarBadge = { external string: string => t = "%identity" } +type tabBarLabelArgs = { + focused: bool, + color: string, + children: string, +} + +@unboxed +type tabBarLabel = String(string) | Function(tabBarLabelArgs => React.element) + type options = { title?: string, tabBarIcon?: tabBarIconOptions => React.element, tabBarColor?: Color.t, - tabBarLabel?: string, + tabBarLabel?: tabBarLabel, tabBarBadge?: TabBarBadge.t, tabBarAccessibilityLabel?: string, tabBarTestID?: string,