Skip to content

Conversation

lidord-wix
Copy link
Collaborator

Description

Resolves #1263
Add wideIndicator prop to make the indicator wider
Add spreadItems prop to make the items spread (default is true).

Changelog

Add wideIndicator and spreadItems props to TabController.TabBar

@lidord-wix lidord-wix requested a review from M-i-k-e-l June 2, 2021 10:02
@ethanshar ethanshar requested review from ethanshar and removed request for M-i-k-e-l June 3, 2021 07:31
@ethanshar ethanshar assigned ethanshar and unassigned M-i-k-e-l Jun 3, 2021
const TabBar = (props: Props) => {
const {
items: propsItems,
spreadItems = true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd move = true to defaultProps.


const indicatorContainerStyle = useMemo(() => {
return [styles.tabBar, !_.isUndefined(height) && {height}, {backgroundColor}];
return [styles.tabBar, {flex: spreadItems && 1}, !_.isUndefined(height) && {height}, {backgroundColor}];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Android crashes because of this :(

@lidord-wix lidord-wix requested a review from M-i-k-e-l June 6, 2021 06:20
@lidord-wix lidord-wix merged commit 54c2e5e into master Jun 6, 2021
Copy link
Collaborator

@ethanshar ethanshar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lidord-wix
I know it's been merged, but please see my comments.

CC @M-i-k-e-l

@lidord-wix lidord-wix deleted the feat/tabController_style branch July 4, 2021 09:21
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.

Support customize spacing, padding, and indicator width on TabController.TabBar
3 participants