eBay / nice-modal-react

A modal state manager for React.
https://ebay.github.io/nice-modal-react
MIT License
1.96k stars 110 forks source link

Fix useModel arguments type #82

Closed facuparedes-litebox closed 1 year ago

facuparedes-litebox commented 1 year ago

Fixed useModal generic type. It worked well until version 1.2.6

Before: image

Now: image

codecov-commenter commented 1 year ago

Codecov Report

Merging #82 (1b91b68) into main (1feda06) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##              main       #82   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          201       201           
  Branches        30        30           
=========================================
  Hits           201       201           
Impacted Files Coverage Δ
src/index.tsx 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

supnate commented 1 year ago

Hi @alexandredev3 , can you confirm if PreparedProps needs a default value?

alexandredev3 commented 1 year ago

Hey @supnate! Yes, PreparedProps needs a default value. I created a PR to fix this issue https://github.com/eBay/nice-modal-react/pull/83

supnate commented 1 year ago

Published in 1.2.8 @alexandredev3 @facuparedes-litebox , thanks guys!