renderTabBar()

in src/components/issue-tabbed/issue-tabbed.tsx [94:140]


  renderTabBar(uiTheme: UITheme, editMode: boolean = false) {
    return (props: Record<string, any>) => {
      const uiThemeColors: UIThemeColors = uiTheme.colors;
      return (
        <TabBar
          {...props}
          pressColor={uiThemeColors.$disabled}
          indicatorStyle={{
            backgroundColor: editMode ? 'transparent' : uiThemeColors.$link,
          }}
          style={[
            styles.tabsBar,
            editMode
              ? {
                  height: 1,
                }
              : null,
            {
              shadowColor: uiThemeColors.$separator,
            },
          ]}
          renderLabel={({route, focused}) => {
            return (
              <View style={styles.tabLabel}>
                <Text
                  style={[
                    styles.tabLabelText,
                    {
                      color:
                        focused && !editMode
                          ? uiThemeColors.$link
                          : this.isTabChangeEnabled()
                          ? uiThemeColors.$text
                          : uiThemeColors.$disabled,
                    },
                  ]}
                >
                  {route.title}
                </Text>
                {this.getRouteBadge(route)}
              </View>
            );
          }}
        />
      );
    };
  }