Skip to content

Commit 69f0576

Browse files
authored
Merge pull request #16709 from Budibase/fix/default-app-icon
Fix default app icon
2 parents f1ca7f0 + fd02c15 commit 69f0576

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

packages/builder/src/components/common/EditableIcon.svelte

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@
66
export let size: "M" | "L" | "XL" = "M"
77
export let color: string
88
export let disabled: boolean = false
9+
export let defaultValue = "squares-four"
910
1011
let modal: Modal
12+
13+
$: icon = name || defaultValue
1114
</script>
1215

1316
<!-- svelte-ignore a11y-click-events-have-key-events -->
1417
<!-- svelte-ignore a11y-no-static-element-interactions -->
15-
<div class="editable-icon">
18+
<div class="editable-icon" class:disabled>
1619
{#if !disabled}
1720
<div class="hover" on:click={modal.show}>
1821
<Icon
@@ -22,10 +25,10 @@
2225
/>
2326
</div>
2427
<div class="normal">
25-
<Icon name={name || "squares-four"} {size} {color} />
28+
<Icon name={icon} {size} {color} />
2629
</div>
2730
{:else}
28-
<Icon {name} {size} {color} />
31+
<Icon name={icon} {size} {color} />
2932
{/if}
3033
</div>
3134

@@ -52,4 +55,7 @@
5255
.editable-icon:hover .hover {
5356
display: block;
5457
}
58+
.disabled {
59+
opacity: 0.5;
60+
}
5561
</style>

0 commit comments

Comments
 (0)