chore(svelte): cleanup examples
This commit is contained in:
@@ -5,13 +5,9 @@
|
||||
|
||||
interface $$Props extends NodeProps<{ label: string }> {}
|
||||
|
||||
export let id: $$Props['id'];
|
||||
export let data: $$Props['data'] = { label: 'Node' };
|
||||
export let targetPosition: $$Props['targetPosition'] = Position.Top;
|
||||
export let sourcePosition: $$Props['sourcePosition'] = Position.Bottom;
|
||||
export let xPos: $$Props['xPos'];
|
||||
export let yPos: $$Props['yPos'];
|
||||
export let selected: $$Props['selected'] = false;
|
||||
</script>
|
||||
|
||||
<Handle type="target" position={targetPosition} on:connect:start on:connect on:connect:end />
|
||||
|
||||
@@ -5,13 +5,8 @@
|
||||
|
||||
interface $$Props extends NodeProps<{ label: string }> {}
|
||||
|
||||
export let id: $$Props['id'];
|
||||
export let data: $$Props['data'] = { label: 'Node' };
|
||||
export let targetPosition: $$Props['targetPosition'] = Position.Top;
|
||||
export let sourcePosition: $$Props['sourcePosition'] = Position.Bottom;
|
||||
export let xPos: $$Props['xPos'];
|
||||
export let yPos: $$Props['yPos'];
|
||||
export let selected: $$Props['selected'] = false;
|
||||
</script>
|
||||
|
||||
{data?.label}
|
||||
|
||||
@@ -5,13 +5,8 @@
|
||||
|
||||
interface $$Props extends NodeProps<{ label: string }> {}
|
||||
|
||||
export let id: $$Props['id'];
|
||||
export let data: $$Props['data'] = { label: 'Node' };
|
||||
export let targetPosition: $$Props['targetPosition'] = Position.Top;
|
||||
export let sourcePosition: $$Props['sourcePosition'] = Position.Bottom;
|
||||
export let xPos: $$Props['xPos'];
|
||||
export let yPos: $$Props['yPos'];
|
||||
export let selected: $$Props['selected'] = false;
|
||||
</script>
|
||||
|
||||
{data?.label}
|
||||
|
||||
@@ -53,6 +53,7 @@ export {
|
||||
SelectionMode,
|
||||
type SelectionRect,
|
||||
type OnError,
|
||||
type NodeProps,
|
||||
type NodeOrigin,
|
||||
type OnNodeDrag,
|
||||
type OnSelectionDrag,
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<script lang="ts">
|
||||
import { Position } from '@xyflow/system';
|
||||
import { Handle } from '../../../lib/index';
|
||||
import { Handle, Position, type NodeProps } from '../../../lib/index';
|
||||
|
||||
type $$Props = NodeProps;
|
||||
|
||||
export let data: { color: string; onChange: () => void } = { color: '#111', onChange: () => {} };
|
||||
export let xPos: number = 0;
|
||||
export let yPos: number = 0;
|
||||
</script>
|
||||
|
||||
<Handle type="target" position={Position.Left} />
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { Handle, Position } from '../../../lib/index';
|
||||
import { Handle, Position, type NodeProps } from '../../../lib/index';
|
||||
|
||||
type $$Props = NodeProps;
|
||||
|
||||
export let data: { label: string } = { label: 'Node' };
|
||||
export let xPos: number = 0;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { Handle, Position } from '../../../lib/index';
|
||||
import { Handle, Position, type NodeProps } from '../../../lib/index';
|
||||
|
||||
type $$Props = NodeProps;
|
||||
|
||||
export let id: string;
|
||||
export let xPos: number = 0;
|
||||
@@ -14,7 +16,6 @@
|
||||
</div>
|
||||
<Handle type="source" position={Position.Bottom} />
|
||||
|
||||
|
||||
<style>
|
||||
.custom {
|
||||
background: #ffcc00;
|
||||
|
||||
Reference in New Issue
Block a user