Skip to content

Commit 242245c

Browse files
author
Sasha Milenkovic
committed
docs: fixes accepts solidjs example
1 parent 93a83af commit 242245c

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

docs/components/CodeExample.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<script lang="ts" setup>
2+
import { ref } from "vue";
3+
import type { Component } from "vue";
4+
25
const props = defineProps<{
36
example: string;
47
}>();

docs/examples/accepts/accepts-solid.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,23 @@ export default function MyComponent() {
2424

2525
const config1: Partial<ParentConfig<string>> = {};
2626
config1.accepts = (_parent, lastParent) => {
27-
if (lastParent.el === target2()) {
27+
if (
28+
target2 &&
29+
target2 instanceof HTMLElement &&
30+
lastParent.el === target2
31+
) {
2832
return false;
2933
}
3034
return items2().length < 3;
3135
};
3236

3337
const config2: Partial<ParentConfig<string>> = {};
3438
config2.accepts = (_parent, lastParent) => {
35-
if (lastParent.el === target1()) {
39+
if (
40+
target1 &&
41+
target1 instanceof HTMLElement &&
42+
lastParent.el === target1
43+
) {
3644
return false;
3745
}
3846
return items3().length < 5;

docs/nuxt.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { defineNuxtConfig } from "nuxt/config";
2-
31
const title = "Drag & Drop • by FormKit";
42
const description =
53
"An open-source JavaScript library for declarative data-first drag & drop.";

docs/tsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@
77
"paths": {
88
"~/*": ["./*"]
99
}
10-
},
11-
"files": ["./examples/sorting/sorting-solid.tsx"],
12-
"include": ["./examples/**/*"]
10+
}
1311
}

0 commit comments

Comments
 (0)