revenge-bundle-next/src/plugins/start/settings/components/PluginUninstallConfirmationAlert.tsx
PalmDevs bf8b99efb9
feat(lib/plugins): external plugins support
This is the first draft. Things may change in the future.
Loader changes are required as well.
2026-07-07 00:03:46 +07:00

36 lines
1.1 KiB
TypeScript

import { Design } from '@revenge-mod/discord/design'
import type { AnyPlugin } from '@revenge-mod/plugins/_'
const { AlertModal, AlertActionButton, Text } = Design
export default function PluginUninstallConfirmationAlert({
plugin,
action,
}: {
plugin: AnyPlugin
action: () => Promise<void>
}) {
return (
<AlertModal
title="Uninstall plugin?"
content={
<Text color="text-default">
<Text variant="text-md/semibold" color="text-default">
{plugin.manifest.name}
</Text>{' '}
and all of its data will be removed. This cannot be undone.
</Text>
}
actions={
<>
<AlertActionButton
onPress={action}
text="Uninstall"
variant="destructive"
/>
<AlertActionButton text="Cancel" variant="secondary" />
</>
}
/>
)
}