Removed classcat and reworked class types from string to ClassValue
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import cc from 'classcat';
|
||||
import {
|
||||
getBoundsOfRects,
|
||||
getInternalNodesBounds,
|
||||
@@ -84,7 +83,7 @@
|
||||
<Panel
|
||||
{position}
|
||||
style={style + (bgColor ? `;--xy-minimap-background-color-props:${bgColor}` : '')}
|
||||
class={cc(['svelte-flow__minimap', className])}
|
||||
class={['svelte-flow__minimap', className]}
|
||||
data-testid="svelte-flow__minimap"
|
||||
>
|
||||
{#if store.panZoom}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import cc from 'classcat';
|
||||
import type { ClassValue } from 'svelte/elements';
|
||||
|
||||
let {
|
||||
x,
|
||||
@@ -24,12 +24,12 @@
|
||||
strokeColor?: string;
|
||||
strokeWidth?: number;
|
||||
selected?: boolean;
|
||||
class?: string;
|
||||
class?: ClassValue;
|
||||
} = $props();
|
||||
</script>
|
||||
|
||||
<rect
|
||||
class={cc(['svelte-flow__minimap-node', className])}
|
||||
class={['svelte-flow__minimap-node', className]}
|
||||
class:selected
|
||||
{x}
|
||||
{y}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { PanelPosition } from '@xyflow/system';
|
||||
|
||||
import type { ClassValue } from 'svelte/elements';
|
||||
import type { Node } from '$lib/types';
|
||||
|
||||
export type GetMiniMapNodeAttribute = (node: Node) => string;
|
||||
@@ -29,7 +29,7 @@ export type MiniMapProps = {
|
||||
*/
|
||||
position?: PanelPosition;
|
||||
/** Class applied to container */
|
||||
class?: string;
|
||||
class?: ClassValue;
|
||||
/** Style applied to container */
|
||||
style?: string;
|
||||
/** The aria-label applied to container */
|
||||
|
||||
Reference in New Issue
Block a user