Socket
Socket
Sign inDemoInstall

@highlight-ui/utils-portal-manager

Package Overview
Dependencies
10
Maintainers
10
Versions
87
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @highlight-ui/utils-portal-manager

A collection of portal managers used by UI-components in Personio


Version published
Weekly downloads
3.4K
increased by14.93%
Maintainers
10
Created
Weekly downloads
 

Readme

Source

@highlight-ui/utils-portal-manager

Installation

yarn add @highlight-ui/utils-portal-manager

Usage

PortalManager.containerInstance()

This function creates, or if it exists, returns the global portals container DOM element.

import { PortalManager } from '@highlight-ui/utils-portal-manager';

// Creates a new DOM element
const newPortalsContainer = PortalManager.containerInstance();

// Returns the existing DOM element
const existingPortalsContainer = PortalManager.containerInstance();

console.log(newPortalsContainer == existingPortalsContainer); // => true

GroupedPortal

React component that appends a portal to the global portals container.

import { GroupedPortal } from '@highlight-ui/utils-portal-manager';

const MyComponent = () => {
  return (
    <GroupedPortal>
      This content is rendered in the global portals container.
    </GroupedPortal>
  );
};

FAQs

Last updated on 05 Oct 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc