@tabula/portal-root-for
Allows to get or create portal root.
Installation
Use the package manager pnpm to install @tabula/portal-root-for
.
pnpm add @tabula/portal-root-for
You can use npm or yarn too.
Usage
import { portalRootFor } from '@tabula/portal-root-for';
const root = portalRootFor({ id: 'my-portal' });
You can provide optional className
to automatically add class
attribute to the root element.
import { portalRootFor } from "@tabula/portal-root-for";
const root = portalRootFor({ id: 'my-portal', className: 'my-class' });
License
This project is ISC licensed.