add button to connect to previous connection

This commit is contained in:
marlon-erler
2024-07-20 03:39:47 +02:00
parent bc34e4d7fe
commit f1574c2e54
5 changed files with 80 additions and 28 deletions
+17 -9
View File
@@ -2,18 +2,26 @@ import * as React from "bloatless-react";
import { translations } from "../translations";
export function DeletableListItem(text: string, ondelete: () => void) {
export function DeletableListItem(
text: string,
primaryButton: HTMLElement,
ondelete: () => void
) {
return (
<div class="tile flex-row justify-apart align-center padding-0">
<span class="padding-h">{text}</span>
<button
class="danger"
aria-label={translations.general.deleteItemButtonAudioLabel}
on:click={ondelete}
>
<span class="icon">delete</span>
</button>
<div class="flex-row justify-end">
{primaryButton}
<button
class="danger"
aria-label={translations.general.deleteItemButtonAudioLabel}
on:click={ondelete}
>
<span class="icon">delete</span>
</button>
</div>
</div>
);
}
}