Use modal instead of modal context

This commit is contained in:
Igor committed 2019-11-14 17:25:09 -03:00
1 parent fe687cd2f9
commit ec7337e801
3 files changed
+5 -4

No files matched your search

+2 -1
View File
@@ -111,7 +111,8 @@ ModalProvider.propTypes = {
*/
export const withModal = Component => {
return function WrappedComponent(props) {
return <Component {...props} modalContext={{ ...useModal() }} />;
const { show, hide } = useModal();
return <Component {...props} modal={{ show, hide }} />;
};
};