Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

popupz

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

popupz - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

src/components/index.css

46

dist/index.js

@@ -1,7 +0,10 @@

import React, { useState, useEffect, useContext, createContext } from 'react';
import { FaCircleCheck } from 'react-icons/fa6';
import { IoIosCloseCircle } from 'react-icons/io';
import { RiErrorWarningFill } from 'react-icons/ri';
import { BsFillInfoCircleFill } from 'react-icons/bs';
'use strict';
var React = require('react');
require('./components/index.css');
var fa6 = require('react-icons/fa6');
var io = require('react-icons/io');
var ri = require('react-icons/ri');
var bs = require('react-icons/bs');
function ProgressBar({

@@ -29,6 +32,6 @@ color,

}) => {
const [mood, setMood] = useState('');
const [color, setColor] = useState('');
const [bgcolor, setBgcolor] = useState('');
const [icon, setIcon] = useState(null);
const [mood, setMood] = React.useState('');
const [color, setColor] = React.useState('');
const [bgcolor, setBgcolor] = React.useState('');
const [icon, setIcon] = React.useState(null);
const themes = {

@@ -55,6 +58,6 @@ light: {

const icons = {
success: /*#__PURE__*/React.createElement(FaCircleCheck, null),
error: /*#__PURE__*/React.createElement(IoIosCloseCircle, null),
warning: /*#__PURE__*/React.createElement(RiErrorWarningFill, null),
info: /*#__PURE__*/React.createElement(BsFillInfoCircleFill, null),
success: /*#__PURE__*/React.createElement(fa6.FaCircleCheck, null),
error: /*#__PURE__*/React.createElement(io.IoIosCloseCircle, null),
warning: /*#__PURE__*/React.createElement(ri.RiErrorWarningFill, null),
info: /*#__PURE__*/React.createElement(bs.BsFillInfoCircleFill, null),
default: '🍿'

@@ -66,3 +69,3 @@ };

type = type in themes[theme] ? type : 'default';
useEffect(() => {
React.useEffect(() => {
if (theme in themes) {

@@ -93,10 +96,10 @@ setColor(themes[theme][type]);

const PopzContext = /*#__PURE__*/createContext();
const PopzContext = /*#__PURE__*/React.createContext();
const PopzProvider = ({
children
}) => {
const [popzTheme, setPopzTheme] = useState(null);
const [popzType, setPopzType] = useState(null);
const [popzMessage, setPopzMessage] = useState(null);
const [popzProgressBar, setPopzProgressBar] = useState(null);
const [popzTheme, setPopzTheme] = React.useState(null);
const [popzType, setPopzType] = React.useState(null);
const [popzMessage, setPopzMessage] = React.useState(null);
const [popzProgressBar, setPopzProgressBar] = React.useState(null);
const popz = {

@@ -125,3 +128,3 @@ popz: (theme, type, message, progressBar) => {

const usePopz = () => {
const context = useContext(PopzContext);
const context = React.useContext(PopzContext);
if (!context) {

@@ -133,2 +136,3 @@ throw new Error('usePopz must be used within a PopzProvider');

export { PopzProvider, usePopz };
exports.PopzProvider = PopzProvider;
exports.usePopz = usePopz;
{
"name": "popupz",
"version": "1.0.3",
"version": "1.0.4",
"type": "module",

@@ -5,0 +5,0 @@ "description": "A simple and customizable popup notification library for React and Next.js applications.",

@@ -10,3 +10,3 @@ import { defineConfig } from "rollup";

dir: "dist",
format: "es",
format: "cjs",
name: "popupz",

@@ -21,2 +21,3 @@ },

extract: true,
extract: 'index.css',
plugins: [

@@ -27,3 +28,3 @@ tailwindcss,

],
external: ["react", "react-dom", "react-icons"],
})
external: ["react", "react-dom", "react-icons", /\.css$/],
})
import React, { useState, useEffect } from 'react';
import ProgressBar from './ProgressBar.jsx';
import '../index.css';
import './index.css';
import { FaCircleCheck } from "react-icons/fa6";

@@ -5,0 +5,0 @@ import { IoIosCloseCircle } from "react-icons/io";

import React from 'react';
import '../index.css';
import './index.css';

@@ -4,0 +4,0 @@ function ProgressBar({color, bgcolor}) {

import React, { useState, createContext, useContext } from 'react';
import Popz from './components/Popz.jsx';
import './index.css';
const PopzContext = createContext();

@@ -5,0 +4,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc