react-native-progress
react-native-progress copied to clipboard
Bar width property
To set full width i need to pass null
but declaration accept only numbers
try delete justifyContent: 'center' or alignItems: 'center' in the wrapper view. It's work for me
<Progress.Bar
style={{width: underfined}}
progress={this.state.progress}
indeterminate={false}
height={2}
borderRadius={0}
/>
Its work for me
Having the same issue. Both above mentioned answers does not work for me. (undefined is doing nothing?)
Passing null
works fine and is the way to go according to the documentation.
Problem: It is only typed to numbers
and undefined
.
To make it work I am using // @ts-ignore
currently. But I do not like to be in need of using this.
Can you please fix the typing of this?
I'm using
import {Dimensions} from "react-native";
import ProgressBar from "react-native-progress/Bar";
const barWidth = Dimensions.get("screen").width;
<ProgressBar progress={0.1} width={barWidth} height={2} borderRadius={0}/>
I'm using
import {Dimensions} from "react-native"; import ProgressBar from "react-native-progress/Bar"; const barWidth = Dimensions.get("screen").width; <ProgressBar progress={0.1} width={barWidth} height={2} borderRadius={0}/>
It's not really true if you rotate the device screen @@