popupz
Advanced tools
Comparing version 2.1.5 to 2.2.0
{ | ||
"name": "popupz", | ||
"version": "2.1.5", | ||
"version": "2.2.0", | ||
"description": "A simple and customizable popup notification/modal library for React applications.", | ||
"main": "index.jsx", | ||
"main": "src/index.jsx", | ||
"scripts": { | ||
@@ -7,0 +7,0 @@ "build": "vite build", |
@@ -11,3 +11,2 @@ import React, { useState, useEffect } from 'react'; | ||
const [mood, setMood] = useState(''); | ||
const [color, setColor] = useState(''); | ||
@@ -19,3 +18,2 @@ const [bgcolor, setBgcolor] = useState(''); | ||
light: { | ||
colors: "text-gray-950 bg-white/90", | ||
progessbarBgColor: "#cccccc", | ||
@@ -29,3 +27,2 @@ success: "#00ab66", | ||
dark: { | ||
colors: "text-white bg-gray-800/90", | ||
progessbarBgColor: "#4A5568", | ||
@@ -57,3 +54,2 @@ success: "#32cd32", | ||
setBgcolor(themes[theme].progessbarBgColor); | ||
setMood(themes[theme].colors); | ||
} | ||
@@ -63,3 +59,2 @@ else{ | ||
setBgcolor(themes[theme].progessbarBgColor); | ||
setMood(themes[theme].colors); | ||
} | ||
@@ -70,4 +65,4 @@ setIcon(icons[type]); | ||
return ( | ||
<div className={`popz rounded-[10px] z-[9999] shadow-xl ${mood} ${progressBar==='true' ? 'pt-[7px] pb-[0.2px] px-1':'py-[9px] px-2'}`}> | ||
<div className='text-center px-[5px] flex items-center gap-x-1 text-base'> | ||
<div className={`popz ${theme==='light'? 'lightMode': 'darkMode'} ${progressBar==='true' ? 'withProgressBar':'withoutProgressBar'}`}> | ||
<div className='contentWraper'> | ||
<span style={{color: `${color}`}}> | ||
@@ -74,0 +69,0 @@ {icon} |
@@ -15,3 +15,3 @@ import React from 'react'; | ||
<div> | ||
<div className='loader mt-3 rounded-3xl' style={progressBarStyle}></div> | ||
<div className='loader progressBar' style={progressBarStyle}></div> | ||
</div> | ||
@@ -18,0 +18,0 @@ ) |
Sorry, the diff of this file is not supported yet
11498
271