switch method of applying color style
This commit is contained in:
parent
f04063c26b
commit
4f71f70053
|
@ -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}
|
||||
<i use:styleable={styles}
|
||||
class="{icon} {size}" />
|
||||
</div>
|
Loading…
Reference in New Issue