@svelte-put/inline-svg
Version:
solution to inline SVGs in svelte land
21 lines (19 loc) • 772 B
TypeScript
/** sources for the inline svg */
export type PreprocessorSourceDefinition = {
/**
* directories relative to which the svg source path will be resolved
*/
directories?: string[] | string;
/**
* default attributes to add to the svg element, will override the attributes from the svg source,
* but be overridden by the attributes from the element itself (in svelte source)
*/
attributes?: Record<string, string>;
};
/** global options for configuring behaviors of the inline-svg preprocessor */
export type PreprocessorConfig = {
/** attribute to get the svg source from, default to `inline-src` */
inlineSrcAttributeName?: string;
/** whether to keep the inline src attribute after compilation, default to `false` */
keepInlineSrcAttribute?: boolean;
};