Closed armandabric closed 2 years ago
Merging #49 (fbf2443) into main (f9722ca) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## main #49 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 184 184
Branches 29 29
=========================================
Hits 184 184
Impacted Files | Coverage Δ | |
---|---|---|
src/index.tsx | 100.00% <100.00%> (ø) |
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 f9722ca...fbf2443. Read the comment docs.
Hi @armandabric , since it always needs to use useModal
hook in the modal component to control the state, so we limit the component type to functional component. If you want to use class component, you need to wrap your class component to a functional one with hoc pattern.
This change allow to use
ClassComponent
as modal. TheReact.ComponentType
is an union betweenComponentClass
andFunctionComponent
: