Comparing version 1.3.2 to 1.3.3
@@ -47,3 +47,3 @@ 'use strict'; | ||
dark: { | ||
colors: "text-white bg-gray-800/90", | ||
colors: "text-gray-50 bg-gray-900", | ||
progessbarBgColor: "#4A5568", | ||
@@ -96,2 +96,3 @@ success: "#32cd32", | ||
const [popzProgressBar, setPopzProgressBar] = React.useState(null); | ||
const [popzActive, setPopzActive] = React.useState(false); | ||
const popz = { | ||
@@ -103,2 +104,3 @@ popz: (theme, type, message, progressBar) => { | ||
setPopzProgressBar(progressBar.toLowerCase()); | ||
setPopzActive(true); | ||
setTimeout(() => { | ||
@@ -108,2 +110,3 @@ setPopzTheme(null), setPopzType(null); | ||
setPopzProgressBar(null); | ||
setPopzActive(false); | ||
}, 3000); | ||
@@ -114,3 +117,3 @@ } | ||
value: popz | ||
}, children, (popzType || popzTheme || popzMessage || popzProgressBar) && /*#__PURE__*/React.createElement(Popz, { | ||
}, children, popzActive && /*#__PURE__*/React.createElement(Popz, { | ||
theme: popzTheme, | ||
@@ -117,0 +120,0 @@ type: popzType, |
{ | ||
"name": "popupz", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "A simple and customizable popup notification library for React and Next.js applications.", |
@@ -27,3 +27,3 @@ import React, { useState, useEffect } from 'react'; | ||
dark: { | ||
colors: "text-white bg-gray-800/90", | ||
colors: "text-gray-50 bg-gray-900", | ||
progessbarBgColor: "#4A5568", | ||
@@ -30,0 +30,0 @@ success: "#32cd32", |
@@ -10,2 +10,3 @@ import React, { useState, createContext, useContext } from 'react'; | ||
const [popzProgressBar, setPopzProgressBar] = useState(null); | ||
const [popzActive, setPopzActive] = useState(false); | ||
@@ -18,2 +19,3 @@ const popz = { | ||
setPopzProgressBar(progressBar.toLowerCase()); | ||
setPopzActive(true); | ||
@@ -25,2 +27,3 @@ setTimeout(() => { | ||
setPopzProgressBar(null); | ||
setPopzActive(false); | ||
}, 3000); | ||
@@ -33,3 +36,3 @@ } | ||
{children} | ||
{(popzType || popzTheme || popzMessage || popzProgressBar) && <Popz theme={popzTheme} type={popzType} message={popzMessage} progressBar={popzProgressBar}/>} | ||
{popzActive && <Popz theme={popzTheme} type={popzType} message={popzMessage} progressBar={popzProgressBar}/>} | ||
</PopzContext.Provider> | ||
@@ -36,0 +39,0 @@ ); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24285
797