Skip to content

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianGonz97 committed Mar 13, 2024
1 parent 32f0aa4 commit 4ff8b16
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions apps/www/src/lib/components/docs/component-preview.svelte
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
<script lang="ts">
import * as Tabs from "$lib/registry/new-york/ui/tabs/index.js";
import { Index as RegistryIndex } from "$lib/../__registry__/index.js";
import { Index } from "$lib/../__registry__/index.js";
import { config } from "$lib/stores/index.js";
import { cn } from "$lib/utils.js";
import { StyleSwitcher, ThemeWrapper } from "$lib/components/docs/index.js";
import { Icons } from "./icons/index.js";
export let name: string;
let className: string;
export let align: "center" | "start" | "end" = "center";
/* eslint-disable @typescript-eslint/no-explicit-any */
const Index = RegistryIndex as Record<string, any>;
import type { ComponentType } from "svelte";
let component = Index[$config.style][name]?.component();
export let name: keyof (typeof Index)["default"];
export let align: "center" | "start" | "end" = "center";
let className: string;
export { className as class };
$: component = Index[$config.style][name]?.component();
$: component = Index[$config.style][name]?.component() as Promise<ComponentType>;
/* eslint-disable @typescript-eslint/no-explicit-any */
export let form: any;
Expand Down Expand Up @@ -66,7 +63,7 @@
Loading...
</div>
{:then Component}
<svelte:component this={Component} {form} />
<Component {form} />
{:catch}
<p class="text-sm text-muted-foreground">
Component{" "}
Expand Down

0 comments on commit 4ff8b16

Please sign in to comment.