switch method of applying color style

This commit is contained in:
kevmodrome 2021-01-19 14:00:15 +01:00
parent f04063c26b
commit 4f71f70053
1 changed files with 10 additions and 6 deletions

View File

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