Merge pull request #1001 from Budibase/fix/icon-color-design-panel-setup
Restores Icon components design panel functionality
This commit is contained in:
commit
ec8553e961
|
@ -1,15 +1,20 @@
|
||||||
<script>
|
<script>
|
||||||
import { getContext } from "svelte"
|
import { getContext } from "svelte"
|
||||||
|
|
||||||
// Add this back once we can define specific design options to expose
|
const { styleable } = getContext("sdk")
|
||||||
// const { styleable } = getContext("sdk")
|
const component = getContext("component")
|
||||||
// const component = getContext("component")
|
|
||||||
|
|
||||||
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>
|
||||||
|
|
||||||
<i
|
<i use:styleable={styles}
|
||||||
style={`color: ${color};`}
|
class="{icon} {size}" />
|
||||||
class={`${icon} ${size}`} />
|
|
Loading…
Reference in New Issue