Skip to content

Feat/ TabController.TabBar style #1331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 6, 2021
Merged

Conversation

lidord-wix
Copy link
Contributor

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
@@ -128,11 +135,13 @@ interface Props extends TabControllerBarProps, BaseComponentInjectedProps, Forwa
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.

@@ -339,7 +349,7 @@ const TabBar = (props: Props) => {
}, [shadowStyle, containerWidth, containerStyle]);

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