Share asks the person who holds the pen to confirm their community agreed before a link turns on, and deleting an account lists each owned Rule with PDF and RULE.md export. Case-study Share copies the page link instead of opening the privacy modal, and the sign-in banner stays below the header so Share remains clickable.
48 lines
1.4 KiB
JavaScript
48 lines
1.4 KiB
JavaScript
import React, { useState } from "react";
|
|
import DeleteAccount from "../../app/components/modals/DeleteAccount";
|
|
|
|
/** Figma: Overlay / Modal / Delete Account — node 24985-1959. */
|
|
export default {
|
|
title: "Components/Modals/DeleteAccount",
|
|
component: DeleteAccount,
|
|
parameters: {
|
|
layout: "fullscreen",
|
|
docs: {
|
|
description: {
|
|
component:
|
|
"Account deletion lists each owned Rule with PDF and RULE.md export, then requires a confirmation checkbox.",
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
function DeleteAccountStoryHost() {
|
|
const [open, setOpen] = useState(true);
|
|
return (
|
|
<div className="min-h-[100dvh] bg-[var(--color-surface-invert-brand-primary)] p-6">
|
|
<button
|
|
type="button"
|
|
className="rounded-md bg-[var(--color-surface-default-primary)] px-4 py-2 text-small-paragraph text-[var(--color-content-default-primary)]"
|
|
onClick={() => setOpen(true)}
|
|
>
|
|
Open Delete Account
|
|
</button>
|
|
<DeleteAccount
|
|
isOpen={open}
|
|
onClose={() => setOpen(false)}
|
|
onConfirm={() => setOpen(false)}
|
|
rules={[
|
|
{ id: "rule-1", title: "Juniper Street Food Share" },
|
|
{ id: "rule-2", title: "Mutual Aid Colorado" },
|
|
]}
|
|
onExportPdf={() => undefined}
|
|
onExportMarkdown={() => undefined}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export const Default = {
|
|
render: () => <DeleteAccountStoryHost />,
|
|
};
|