react-fetch-progressbar icon indicating copy to clipboard operation
react-fetch-progressbar copied to clipboard

Provide custom way of rendering progress bar + typing fixes

Open ffMathy opened this issue 5 years ago • 5 comments

This will make it possible to use my own progress bar if needed.

Also fixed typings of style prop (which in turn removed linter warning), and also improved the type of fetch to be more precise.

ffMathy avatar Feb 11 '20 08:02 ffMathy

Codecov Report

Merging #6 into master will decrease coverage by 4.83%. The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##            master       #6      +/-   ##
===========================================
- Coverage   100.00%   95.16%   -4.84%     
===========================================
  Files            1        1              
  Lines           48       62      +14     
  Branches         3       14      +11     
===========================================
+ Hits            48       59      +11     
- Misses           0        3       +3     
Impacted Files Coverage Δ
src/index.tsx 95.16% <0.00%> (-4.84%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5647e63...fab3212. Read the comment docs.

codecov[bot] avatar Feb 11 '20 09:02 codecov[bot]

Codecov fails, but I think it is still reasonable. What do you think?

ffMathy avatar Feb 11 '20 09:02 ffMathy

Codecov fails, but I think it is still reasonable. What do you think?

Good idea to support a render function.

Two things:

  1. The test coverage should be 100% and test the render function.

  2. We should add a children render prop as well

MrHus avatar Feb 11 '20 15:02 MrHus

Can you elaborate what you mean by the children prop?

ffMathy avatar Feb 11 '20 15:02 ffMathy

Can you elaborate what you mean by the children prop?

@ffMathy

That we support both: render and children render function props:

<ProgressBar render={mode => <span>{mode}</span}/>
<ProgressBar>{ mode => <span>{mode}</span}</ProgressBar>

MrHus avatar Feb 12 '20 10:02 MrHus