changed width calculation in tabBar component causing wrong underline width calculation

This commit is contained in:
Sadaqat Ali 2022-05-28 12:59:26 +05:00
parent 79a60c555e
commit 65a84c1938

View File

@ -66,7 +66,7 @@ class TabBar extends PureComponent {
} = this.props; } = this.props;
const { activeColor } = this.state; const { activeColor } = this.state;
const containerWidth = getWindowDimensions().width; const containerWidth = Dimensions.get('window').width;
const numberOfTabs = tabs.length; const numberOfTabs = tabs.length;
const underlineWidth = tabUnderlineDefaultWidth || containerWidth / (numberOfTabs * 2); const underlineWidth = tabUnderlineDefaultWidth || containerWidth / (numberOfTabs * 2);
const scale = tabUnderlineScaleX || 2; const scale = tabUnderlineScaleX || 2;