1
0
Fork 0
mirror of synced 2024-08-21 13:01:47 +12:00
budibase/packages/standard-components/src/Icon.svelte

21 lines
412 B
Svelte
Raw Normal View History

2020-09-15 22:53:02 +12:00
<script>
import { getContext } from "svelte"
const { styleable } = getContext("sdk")
const component = getContext("component")
2020-09-15 22:53:02 +12:00
export let icon = ""
export let size = "fa-lg"
2021-01-20 02:00:15 +13:00
export let color = "#f00"
2021-01-20 02:00:15 +13:00
$: styles = {
...$component.styles,
normal: {
...$component.styles.normal,
color,
},
2021-01-20 02:00:15 +13:00
}
2020-09-15 22:53:02 +12:00
</script>
<i use:styleable={styles} class="{icon} {size}" />