|
2 tuần trước cách đây | |
---|---|---|
.. | ||
es | 2 tuần trước cách đây | |
lib | 2 tuần trước cách đây | |
LICENSE | 2 tuần trước cách đây | |
README.md | 2 tuần trước cách đây | |
package.json | 2 tuần trước cách đây |
React 18 supported Portal Component.
npm install
npm start
open http://localhost:8000
import Portal from 'rc-portal';
const Demo = () => {
return <Portal open>Hello World</Portal>;
};
export default Demo;
We use typescript to create the Type definition. You can view directly in IDE. But you can still check the type definition here.
Prop | Description | Type | Default |
---|---|---|---|
getContainer | Customize portal container element | Element | () => Element | document.body |
open | Show the portal | boolean | false |
autoLock | Lock screen scroll when open | boolean | false |