1
0
Fork 0
mirror of synced 2024-10-02 18:16:29 +13:00

switch method of applying color style

This commit is contained in:
kevmodrome 2021-01-19 14:00:15 +01:00
parent f04063c26b
commit 4f71f70053

View file

@ -6,11 +6,15 @@
export let icon = ""
export let size = "fa-lg"
export let color = "#000"
export let color = "#f00"
$: styles = {
...$component.styles,
normal: {
...$component.styles.normal,
color
}
}
</script>
<div style="color: {color}; display: contents">
<i
use:styleable={$component.styles}
class="{icon} {size}" />
</div>
<i use:styleable={styles}
class="{icon} {size}" />