Standardize context naming

Fixes #7
This commit is contained in:
Ryan Gossiaux
2021-12-18 23:18:45 -08:00
parent 03399fc954
commit 70910c05b0
16 changed files with 20 additions and 18 deletions

View File

@@ -22,7 +22,7 @@
close(focusableElement: HTMLElement | HTMLElement | null): void;
}
let DISCLOSURE_CONTEXT_NAME = "DisclosureContext";
let DISCLOSURE_CONTEXT_NAME = "headlessui-disclosure-context";
export function useDisclosureContext(
component: string

View File

@@ -1,6 +1,6 @@
<script lang="ts" context="module">
import { getContext, setContext } from "svelte";
let DISCLOSURE_PANEL_CONTEXT_NAME = "DisclosurePanelContext";
let DISCLOSURE_PANEL_CONTEXT_NAME = "headlessui-disclosure-panel-context";
export function usePanelContext(): string | undefined {
return getContext(DISCLOSURE_PANEL_CONTEXT_NAME);