Skip to content

href attribute causes compiler error with component #114

@Zamiell

Description

@Zamiell

Getting an error with the latest version of SvelteKit:

<script lang="ts">
  import { DisclosureButton } from "@rgossiaux/svelte-headlessui";
</script>

<DisclosureButton as="a" href="foo" />
Type '{ as: "a"; href: string; }' is not assignable to type 'IntrinsicAttributes & Omit<TRenderProps<{ open: boolean; close: (focusableElement: HTMLElement | null) => void; }, "a", "button">, TInternalProps | ... 2 more ... | "unmount"> & { ...; } & { ...; }'.
  Property 'href' does not exist on type 'IntrinsicAttributes & Omit<TRenderProps<{ open: boolean; close: (focusableElement: HTMLElement | null) => void; }, "a", "button">, TInternalProps | ... 2 more ... | "unmount"> & { ...; } & { ...; }'.

This error is confusing, as I'm pretty sure this code has been working just fine until recently.

Library version
1.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions