Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:LinusBorg/portal-vue into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusBorg committed Aug 1, 2019
2 parents 60c0503 + f810fe9 commit bba0d45
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/api/portal-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ Example:
```html {1-3}
<portal-target name="destination" :slotScope="{ message: 'Hi!' }">
<p slot-scope="props">
{{props.mesage}} This is rendered when no other content is available.
{{props.message}} This is rendered when no other content is available.
</p>
</portal-target>
```
Expand Down
6 changes: 3 additions & 3 deletions docs/api/portal.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ But it might be a good idea to name your `<Portal>` components so you can debug

### `order` <Badge text="1.2.0+"/>

| Type | Required | Default |
| ----------------- | -------- | --------------- |
| `[String,Number]` | no\* | a random String |
| Type | Required | Default |
| -------- | -------- | ------- |
| `Number` | no\* | 0 |

This prop defines the order position in the output of the `<PortalTarget>`.

Expand Down
11 changes: 6 additions & 5 deletions docs/api/wormhole.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ The `open` method accepts one argument, an object with the following properties:

`Wormhole.open({to, from, passengers})`

| Property | Required | Default | Explanation |
| ---------- | -------- | ------- | ------------------------------------------------------------------- |
| to | yes | | The name of the `<PortalTarget>` to send to |
| from | yes | | The name of the `<Portal>` this content comes from. |
| passengers | no | | An array of vNodes - the content to be sent to the `<PortalTarget>` |
| Property | Required | Default | Explanation |
| ---------- | -------- | -------- | ------------------------------------------------------------------- |
| to | yes | | The name of the `<PortalTarget>` to send to |
| from | yes | | The name of the `<Portal>` this content comes from. |
| passengers | yes | | An array of vNodes - the content to be sent to the `<PortalTarget>` |
| order | no | Infinity | a number indicating the order when multipe sources for a target are used |

Even if you use this method programmatically and there is not source `<Portal>`, you still have to provide `from` - every content sent through the wormhole needs a source.

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ In older browsers, `position: fixed` works unreliably when the element with that

But we normally need it to render components like modals, dialogs, notifications, snackbars and similar UI elements in a fixed position.

Also, z-indices can be a problem when trying to render things on top of each other somehwere in the DOM.
Also, z-indices can be a problem when trying to render things on top of each other somewhere in the DOM.

With PortalVue, you can render your modal/overlay/dropdown component to a `<portal-target>` that you can position as the very last in the page's `body`, making styling and positioning much easier and less error-prone.

Expand Down

0 comments on commit bba0d45

Please sign in to comment.