Skip to content

Commit 7cfbed8

Browse files
committed
[docs] Add information about workaround for #48
1 parent 3d647bb commit 7cfbed8

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

.changeset/rude-avocados-fly.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"docs": patch
3+
---
4+
5+
Add information about workaround for <https://github.com/x0k/svelte-jsonschema-form/issues/48>

apps/docs/src/content/docs/themes/shadcn.mdx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,22 @@ Since `shadcn-svelte` is not a component library you should provide your compone
5858

5959
```typescript
6060
import { setThemeContext } from '@sjsf/shadcn-theme';
61+
import { components } from '@sjsf/shadcn-theme/default';
62+
// or import { components } from '@sjsf/shadcn-theme/new-york';
6163

62-
setThemeContext({ components: { ... } })
64+
setThemeContext({ components })
6365
```
6466

65-
However, you can use already prepared component sets or mix them with your own components:
67+
:::caution
68+
69+
You should define `components: ThemeComponents` yourself:
70+
71+
- to reduce final bundle size
72+
- to avoid https://github.com/x0k/svelte-jsonschema-form/issues/48
6673

67-
- `@sjsf/shadcn-theme/default`
68-
- `@sjsf/shadcn-theme/new-york`
74+
In this case you also should remove `bind:this={ref}` bindings from your components.
75+
76+
:::
6977

7078
## Demo
7179

@@ -74,7 +82,7 @@ However, you can use already prepared component sets or mix them with your own c
7482
Currently, some `shadcn-svelte` components do not work in the shadow DOM,
7583
which is used in the documentation and playground.
7684

77-
See [this issue](https://github.com/huntabyte/bits-ui/issues/828) for more details.
85+
See https://github.com/huntabyte/bits-ui/issues/828 for more details.
7886

7987
:::
8088

0 commit comments

Comments
 (0)