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

@launchpad-ui/portal

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@launchpad-ui/portal - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

26

dist/index.es.js

@@ -1,13 +0,19 @@

import { jsx } from "react/jsx-runtime";
import { forwardRef, useState, useEffect } from "react";
import { createPortal } from "react-dom";
const Portal = forwardRef(
({ container = ((_a) => (_a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a.body)(), "data-test-id": testId = "portal", ...props }, ref) => {
const [mounted, setMounted] = useState(false);
useEffect(() => {
setMounted(true);
}, []);
return mounted && container ? createPortal(/* @__PURE__ */ jsx("div", { ...props, ref, "data-test-id": testId }), container) : null;
}
);
import { jsx } from "react/jsx-runtime";
const Portal = forwardRef(({
container = ((_a) => (_a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a.body)(),
"data-test-id": testId = "portal",
...props
}, ref) => {
const [mounted, setMounted] = useState(false);
useEffect(() => {
setMounted(true);
}, []);
return mounted && container ? createPortal(/* @__PURE__ */ jsx("div", {
...props,
ref,
"data-test-id": testId
}), container) : null;
});
Portal.displayName = "Portal";

@@ -14,0 +20,0 @@ export {

"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const react = require("react");
const reactDom = require("react-dom");
const Portal = react.forwardRef(
({ container = ((_a) => (_a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a.body)(), "data-test-id": testId = "portal", ...props }, ref) => {
const [mounted, setMounted] = react.useState(false);
react.useEffect(() => {
setMounted(true);
}, []);
return mounted && container ? reactDom.createPortal(/* @__PURE__ */ jsxRuntime.jsx("div", { ...props, ref, "data-test-id": testId }), container) : null;
}
);
const jsxRuntime = require("react/jsx-runtime");
const Portal = react.forwardRef(({
container = ((_a) => (_a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a.body)(),
"data-test-id": testId = "portal",
...props
}, ref) => {
const [mounted, setMounted] = react.useState(false);
react.useEffect(() => {
setMounted(true);
}, []);
return mounted && container ? reactDom.createPortal(/* @__PURE__ */ jsxRuntime.jsx("div", {
...props,
ref,
"data-test-id": testId
}), container) : null;
});
Portal.displayName = "Portal";
exports.Portal = Portal;
//# sourceMappingURL=index.js.map
{
"name": "@launchpad-ui/portal",
"version": "0.1.1",
"version": "0.1.2",
"status": "alpha",

@@ -26,8 +26,8 @@ "publishConfig": {

"peerDependencies": {
"react": "^18.0.0",
"react-dom": "^18.0.0"
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react": "18.2.0",
"react-dom": "18.2.0"
},

@@ -34,0 +34,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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