1.0.2 • Published 2 years ago

portal-storm v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Portal Storm

GitHub npm version Tests codecov

A simple wrapper component for React portals.

Installation

Run yarn add portal-storm or npm i portal-storm.

Usage

Note: Both the container and the children props are required.

import React from 'react';
import Portal from 'portal-storm';
import logo from './assets/images/logo.png';

export default function App() {
  return (
    <div className="App">
      <Portal container={document.head}>
        <link rel="preload" as="image" href={logo} type="image/png" />
      </Portal>
      <img className="App__logo" src={logo} alt="logo" />
    </div>
  );
}
1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago