@leafygreen-ui/portal
LeafyGreen UI Kit Portal
Last updated 2 months ago by brookescarlett .
Apache-2.0 · Original npm · Tarball · package.json
$ cnpm install @leafygreen-ui/portal 
SYNC missed versions from official npm registry.

Portal

npm (scoped)

View on Storybook

Installation

Yarn

yarn add @leafygreen-ui/portal

NPM

npm install @leafygreen-ui/portal

Example

import Portal from '@leafygreen-ui/portal';

<Portal>
  <div>
    Portals transport their children to a div that is appended to the end of the
    document.body to or a node that can be specified with a container prop.
  </div>
</Portal>;

Output HTML

<div>
  <div class="leafygreen-ui-xi606m">
    Portals transport their children to a div that is appended to the end of the
    document.body to or a node that can be specified with a container prop.
  </div>
</div>

Properties

Prop Type Description Default
container DOM Node Sets the container node, which will contain all of the portaled content. If no container is supplied, a div will be created and apened to the end of the document.body. document.createElement('div')
children node The children will be rendered inside of the portaled container.

Current Tags

  • 3.1.0                                ...           latest (2 months ago)

26 Versions

  • 3.1.0                                ...           2 months ago
  • 3.0.1                                ...           3 months ago
  • 3.0.0                                ...           4 months ago
  • 2.2.1                                ...           5 months ago
  • 2.2.0                                ...           6 months ago
  • 2.1.3                                ...           6 months ago
  • 2.1.2                                ...           6 months ago
  • 2.1.1                                ...           6 months ago
  • 2.1.0                                ...           7 months ago
  • 2.0.1                                ...           10 months ago
  • 2.0.0                                ...           a year ago
  • 1.1.8                                ...           a year ago
  • 1.1.7                                ...           a year ago
  • 1.1.6                                ...           a year ago
  • 1.1.5                                ...           a year ago
  • 1.1.4                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 1
Last Month 38
Dependencies (1)
Dev Dependencies (0)
None

Copyright 2014 - 2017 © taobao.org |