budibase/packages/standard-components/node_modules/svelte-portal
Martin McKeaveney 990882f9db allow configuration of redis cluster with fully qualified redis URL 2021-09-09 17:14:24 +01:00
..
src allow configuration of redis cluster with fully qualified redis URL 2021-09-09 17:14:24 +01:00
LICENSE allow configuration of redis cluster with fully qualified redis URL 2021-09-09 17:14:24 +01:00
README.md allow configuration of redis cluster with fully qualified redis URL 2021-09-09 17:14:24 +01:00
package.json allow configuration of redis cluster with fully qualified redis URL 2021-09-09 17:14:24 +01:00

README.md

Svelte component for rendering outside the DOM of parent component

Idea borrowed from here: https://github.com/sveltejs/svelte/issues/3088#issuecomment-505785516

Installation

npm install --save svelte-portal

or

yarn add svelte-portal

Basic Usage

<script>
  import Portal from 'svelte-portal';

  export let show = true;
</script>

{#if show}
  <Portal target="{document.body}">
    <div class="notification __success">Entity successfully updated!</div>
  </Portal>
{/if}