mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-18 14:38:24 +00:00
21 lines
539 B
TypeScript
21 lines
539 B
TypeScript
import { getContext, setContext } from 'svelte';
|
|
|
|
const LucideContext = Symbol('lucide-context');
|
|
|
|
export interface LucideGlobalContext {
|
|
color?: string;
|
|
size?: number;
|
|
strokeWidth?: number;
|
|
/**
|
|
* @deprecated Use `nonScalingStroke` instead.
|
|
*/
|
|
absoluteStrokeWidth?: boolean;
|
|
nonScalingStroke?: boolean;
|
|
class?: string;
|
|
}
|
|
|
|
export const setLucideProps = (globalProps: LucideGlobalContext) =>
|
|
setContext(LucideContext, globalProps);
|
|
|
|
export const getLucideContext = () => getContext<LucideGlobalContext>(LucideContext);
|