Files
CT/src/View/Components/deletableListItem.tsx
T

28 lines
644 B
TypeScript
Raw Normal View History

2024-07-20 03:34:54 +02:00
import * as React from "bloatless-react";
import { translations } from "../translations";
export function DeletableListItem(
text: string,
primaryButton: HTMLElement,
ondelete: () => void
) {
2024-07-20 03:34:54 +02:00
return (
<div class="tile flex-row justify-apart align-center padding-0">
2024-07-20 22:53:10 +02:00
<span class="padding-h ellipsis">{text}</span>
2024-07-20 03:34:54 +02:00
<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>
2024-07-20 03:34:54 +02:00
</div>
);
}