Hi, I'm having some issue with the CircleButton. The following code is tested and works with RectangleButton
return (
<CircleButton
buttonState={this.state.buttonState}
states={{
downloaded: {
text: title,
onPress: this.props.onClick,
backgroundColors: ['#4DC7A4', '#66D37A'],
},
notDownloaded: {
text: title,
onPress: this.fakeDownload.bind(this),
backgroundColors: ['#eb4c13', '#e41c2a'],
},
downloading: {
text: title,
onPress: this.props.onClick,
backgroundColors: ['#6A6AD5', '#6F86D9'],
progress: true,
progressFill: this.state.downloadProgress,
progressText: `${this.state.downloadProgress}%`,
spinner: true,
progressSize: 30,
progressWidth: 2,
},
}}
/>
);
First state is notDownloaded which looks like it should. On click it gets the downloading state which displays the correct background colors, but nothing else. Once it's done it gets the downloaded state which also works. No text, no progress text or border during downloading.
If I set progress, progressFill and progressText on notDownloaded, i.e. the first state, the progress shows, but it's gone when download starts.
As I said, everything works if I change to using RectangleButton.
Any idea what the issue could be?
Hi, I'm having some issue with the
CircleButton. The following code is tested and works withRectangleButtonFirst state is
notDownloadedwhich looks like it should. On click it gets thedownloadingstate which displays the correct background colors, but nothing else. Once it's done it gets thedownloadedstate which also works. No text, no progress text or border during downloading.If I set
progress,progressFillandprogressTextonnotDownloaded, i.e. the first state, the progress shows, but it's gone when download starts.As I said, everything works if I change to using
RectangleButton.Any idea what the issue could be?