Skip to content

Allow to custom MaterialTabBar indicator#341

Open
thanhcuong1990 wants to merge 1 commit intoPedroBern:mainfrom
thanhcuong1990:allow-to-custom-material-tab-indicator
Open

Allow to custom MaterialTabBar indicator#341
thanhcuong1990 wants to merge 1 commit intoPedroBern:mainfrom
thanhcuong1990:allow-to-custom-material-tab-indicator

Conversation

@thanhcuong1990
Copy link

IndicatorComponent

To custom MaterialTabBar indicator we can use IndicatorComponent as a prop of MaterialTabBar.

  const CustomTabbar = useCallback(
    (props) => {
      return (
        <MaterialTabBar
          {...props}
          TabItemComponent={CustomTabItem}
          IndicatorComponent={CustomTabIndicator}
        />
      )
    },
    []
  )

  return (
    <Tabs.Container
      renderTabBar={CustomTabbar}
    >
    ...
    </Tabs.Container>
  )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant