1.1.4 • Published 1 year ago

rc-portal-modern v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

rc-portal

React 18 supported Portal Component.

NPM version dumi build status Codecov npm download

Development

npm install
npm start
open http://localhost:8000

Feature

  • React life cycle support portal component

Install

rc-portal

Usage

import Portal from 'rc-portal';

const Demo = () => {
  return <Portal open>Hello World</Portal>;
};

export default Demo;

🔥 API

We use typescript to create the Type definition. You can view directly in IDE. But you can still check the type definition here.

Portal

PropDescriptionTypeDefault
getContainerCustomize portal container elementElement | () => Elementdocument.body
openShow the portalbooleanfalse
autoLockLock screen scroll when openbooleanfalse
1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago