Add repo removal confirmation alert component

This commit is contained in:
Rosie Val 2026-08-08 21:30:23 -04:00
parent d8b0d5971a
commit baca849042

View file

@ -0,0 +1,37 @@
import { Design } from '@revenge-mod/discord/design'
import type { Repo } from '@revenge-mod/plugins/_/repositories'
const { AlertModal, AlertActionButton, Text } = Design
export default function RepoRemoveConfirmationAlert({
repo,
action,
}: {
repo: Repo
action: () => Promise<void> | void
}) {
return (
<AlertModal
title="Remove repository?"
content={
<Text color="text-default">
<Text variant="text-md/semibold" color="text-default">
{repo.name ?? repo.url}
</Text>{' '}
will be removed. You can restore the default repositories by
clearing Plugin Settings data.
</Text>
}
actions={
<>
<AlertActionButton
onPress={action}
text="Remove"
variant="destructive"
/>
<AlertActionButton text="Cancel" variant="secondary" />
</>
}
/>
)
}