fix: Improve toggle switch placement in settings screen (#208) (#232)

Co-authored-by: Pratyush Mohanty <prat_09@noreply.coracle.social>
Co-committed-by: Pratyush Mohanty <prat_09@noreply.coracle.social>
This commit was merged in pull request #232.
This commit is contained in:
2026-04-17 21:58:52 +00:00
committed by hodlbod
parent 56edad77a8
commit 32a31045ef
5 changed files with 141 additions and 78 deletions
+16 -9
View File
@@ -13,7 +13,12 @@
placeholder?: string
}
let {value = $bindable(), addLabel, placeholder = "Enter text..."}: Props = $props()
let {
value = $bindable(),
addLabel,
placeholder = "Enter text...",
allowAdd = true,
}: Props & {allowAdd?: boolean} = $props()
let draggedIndex: number | null = $state(null)
const onChange = (newValue: string[]) => {
@@ -72,12 +77,14 @@
</div>
</div>
{/each}
<Button onclick={addItem} class="btn btn-link w-fit px-0">
<Icon icon={AddCircle} size={5} />
{#if addLabel}
{@render addLabel?.()}
{:else}
Add Item
{/if}
</Button>
{#if allowAdd}
<Button onclick={addItem} class="btn btn-link w-fit px-0">
<Icon icon={AddCircle} size={5} />
{#if addLabel}
{@render addLabel?.()}
{:else}
Add Item
{/if}
</Button>
{/if}
</div>