UNPKG

phosphor-svelte

Version:

A clean and friendly icon family for Svelte

20 lines (15 loc) 376 B
import { getContext, hasContext, setContext } from "svelte"; let contextKey = Symbol("phosphor-svelte"); export function setIconContext(value) { setContext(contextKey, value); } /** * * @returns {import("./shared").IconContextProps["values"]} */ export function getIconContext() { if (hasContext(contextKey)) { return getContext(contextKey); } return {}; }