switch method of applying color style
This commit is contained in:
parent
f04063c26b
commit
4f71f70053
|
@ -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>
|
|
Loading…
Reference in New Issue