Skip to content

Commit 1e70433

Browse files
committed
[builder] Disable draggable element text selection
1 parent 3a66324 commit 1e70433

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

apps/builder/.prettierrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"useTabs": true,
3-
"singleQuote": true,
2+
"useTabs": false,
3+
"singleQuote": false,
44
"trailingComma": "none",
55
"printWidth": 100,
66
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
2-
import type { Snippet } from 'svelte';
3-
import { noop } from '@sjsf/form/lib/function';
2+
import type { Snippet } from "svelte";
3+
import { noop } from "@sjsf/form/lib/function";
44
55
import type { Node } from "$lib/builder/index.js";
66
@@ -9,7 +9,7 @@
99
interface Props {
1010
createNode: () => Node;
1111
title: string;
12-
icon: Snippet
12+
icon: Snippet;
1313
}
1414
1515
const { createNode, title, icon }: Props = $props();
@@ -19,17 +19,17 @@
1919
unmount: noop,
2020
get node() {
2121
return createNode();
22-
},
22+
}
2323
});
2424
</script>
2525

2626
<div
2727
class={[
28-
"flex items-center gap-2 p-2 rounded-md cursor-grab border hover:bg-accent",
29-
draggable.isDragged && "bg-accent",
28+
"flex cursor-grab items-center gap-2 rounded-md border bg-background p-2 select-none hover:bg-accent",
29+
draggable.isDragged && "bg-accent"
3030
]}
3131
{@attach draggable.attach}
3232
>
33-
{@render icon()}
33+
{@render icon()}
3434
<span class="text-sm font-medium text-foreground">{title}</span>
3535
</div>

0 commit comments

Comments
 (0)