Cweili/svelte-fa

Default Props On Component Exports

Closed this issue · 1 comments

Nice library and good job... thanks!

The Svelte Docs recommend setting default props on components to avoid compiler warnings, and even though it's not critical, many people appreciate using this convention.

image

It looks like color, primaryColor, and secondaryColor could use a default. The docs recommend setting to undefined if there is no other preferred default value.

export let icon;  // no default here makes sense
export let fw = false;
export let flip = false;
export let pull = false;
export let rotate = false;
export let size = false;
export let color = undefined;  // <--- add default

// Duotone Icons
export let primaryColor = undefined;  // <--- add default
export let secondaryColor = undefined;  // <--- add default
export let primaryOpacity = 1;
export let secondaryOpacity = 0.4;
export let swapOpacity = false;

Thanks very much! Try new version 2.1.1.