Provide custom way of rendering progress bar + typing fixes
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.
Codecov Report
Merging #6 into master will decrease coverage by
4.83%. The diff coverage isn/a.
@@ 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 dataPowered by Codecov. Last update 5647e63...fab3212. Read the comment docs.
Codecov fails, but I think it is still reasonable. What do you think?
Codecov fails, but I think it is still reasonable. What do you think?
Good idea to support a render function.
Two things:
-
The test coverage should be 100% and test the render function.
-
We should add a
childrenrender prop as well
Can you elaborate what you mean by the children prop?
Can you elaborate what you mean by the
childrenprop?
@ffMathy
That we support both: render and children render function props:
<ProgressBar render={mode => <span>{mode}</span}/>
<ProgressBar>{ mode => <span>{mode}</span}</ProgressBar>