-
Notifications
You must be signed in to change notification settings - Fork 734
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
Conversation
@@ -128,11 +135,13 @@ interface Props extends TabControllerBarProps, BaseComponentInjectedProps, Forwa | |||
const TabBar = (props: Props) => { | |||
const { | |||
items: propsItems, | |||
spreadItems = true, |
There was a problem hiding this comment.
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}]; |
There was a problem hiding this comment.
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 :(
There was a problem hiding this 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
Description
Resolves #1263
Add
wideIndicator
prop to make the indicator widerAdd
spreadItems
prop to make the items spread (default is true).Changelog
Add
wideIndicator
andspreadItems
props to TabController.TabBar