Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

Commit

Permalink
fix: remove opacity from indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Jan 1, 2017
1 parent 44ba0ee commit 6ab4991
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions example/src/BottomBarIconTextExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ export default class TopBarIconExample extends Component {
};

_renderIndicator = (props) => {
const { width, opacity, position } = props;
const { width, position } = props;

const translateX = Animated.multiply(position, width);

return (
<Animated.View
style={[ styles.container, { width, opacity, transform: [ { translateX } ] } ]}
style={[ styles.container, { width, transform: [ { translateX } ] } ]}
>
<View style={styles.indicator} />
</Animated.View>
Expand Down
3 changes: 1 addition & 2 deletions src/TabBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const styles = StyleSheet.create({
});

type IndicatorProps = SceneRendererProps & {
width: number;
width: Animated.Value;
}

type ScrollEvent = {
Expand Down Expand Up @@ -311,7 +311,6 @@ export default class TabBar extends Component<DefaultProps, Props, State> {
this.props.renderIndicator({
...this.props,
width: new Animated.Value(tabWidth),
opacity: this.state.visibility,
}) :
null
}
Expand Down
4 changes: 2 additions & 2 deletions src/TabBarTop.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ export default class TabBarTop extends Component<DefaultProps, Props, void> {
};

_renderIndicator = (props: IndicatorProps) => {
const { width, opacity, position } = props;
const { width, position } = props;
const translateX = Animated.multiply(position, width);

return (
<Animated.View
style={[ styles.indicator, { width, opacity, transform: [ { translateX } ] }, this.props.indicatorStyle ]}
style={[ styles.indicator, { width, transform: [ { translateX } ] }, this.props.indicatorStyle ]}
/>
);
};
Expand Down

0 comments on commit 6ab4991

Please sign in to comment.