rn-portal

1.0.0 • Public • Published

rn-portal

基于 react-native 的传送门

install

$ npm install rn-portal

Example

// 出口
<PortalOut id="main" />
 
// 入口
<Portal to="main" visible>
  <UserComponents />
</Portal>
 
 

Portal

props

  • to 传送门出口ID(与ProtalOut id 一致)
  • visible 传送门开关

ProtalOut

  • id 传送门出口ID
  • style 可以设置传送门样式
  • 默认
      {
        position: 'absolute',
        top0,
        bottom0,
        left0,
        right0,
        zIndex: 10
      }

Package Sidebar

Install

npm i rn-portal

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

4.6 kB

Total Files

7

Last publish

Collaborators

  • wd