rename hideOnSSR
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { getContext } from 'svelte';
|
||||
import { hideDuringSSR, portal } from '$lib/actions/portal';
|
||||
import { hideOnSSR, portal } from '$lib/actions/portal';
|
||||
|
||||
import { useStore } from '$lib/store';
|
||||
import type { EdgeLabelProps } from './types';
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
<div
|
||||
use:portal={'edge-labels'}
|
||||
style:display={hideDuringSSR().display}
|
||||
style:display={hideOnSSR().value ? 'none' : undefined}
|
||||
class={['svelte-flow__edge-label', { transparent }, className]}
|
||||
style:cursor={selectEdgeOnClick ? 'pointer' : undefined}
|
||||
style:transform="translate(-50%, -50%) translate({x}px,{y}px)"
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
<script lang="ts">
|
||||
import { hideDuringSSR, portal } from '$lib/actions/portal';
|
||||
import { hideOnSSR, portal } from '$lib/actions/portal';
|
||||
import type { ViewportPortalProps } from './types';
|
||||
|
||||
let { target = 'front', children, ...rest }: ViewportPortalProps = $props();
|
||||
</script>
|
||||
|
||||
<div use:portal={`viewport-${target}`} style:display={hideDuringSSR().display} {...rest}>
|
||||
<div
|
||||
use:portal={`viewport-${target}`}
|
||||
style:display={hideOnSSR().value ? 'none' : undefined}
|
||||
{...rest}
|
||||
>
|
||||
{@render children?.()}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user