Cleanup pass 2
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import Shapes from "../../app/components/asset/Shapes";
|
||||
|
||||
export default {
|
||||
title: "Components/Asset/Shapes",
|
||||
component: Shapes,
|
||||
parameters: { layout: "centered" },
|
||||
argTypes: {
|
||||
variant: {
|
||||
control: { type: "select" },
|
||||
options: ["yellow", "purple", "green", "orange"],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const Yellow = { args: { variant: "yellow" } };
|
||||
export const Purple = { args: { variant: "purple" } };
|
||||
export const Green = { args: { variant: "green" } };
|
||||
export const Orange = { args: { variant: "orange" } };
|
||||
@@ -0,0 +1,36 @@
|
||||
import SelectOption from "../../app/components/controls/SelectOption";
|
||||
|
||||
export default {
|
||||
title: "Components/Controls/SelectOption",
|
||||
component: SelectOption,
|
||||
parameters: { layout: "centered" },
|
||||
argTypes: {
|
||||
size: {
|
||||
control: { type: "select" },
|
||||
options: ["small", "medium", "large"],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const Default = {
|
||||
args: {
|
||||
children: "Consensus",
|
||||
size: "medium",
|
||||
},
|
||||
};
|
||||
|
||||
export const Selected = {
|
||||
args: {
|
||||
children: "Liquid democracy",
|
||||
selected: true,
|
||||
size: "medium",
|
||||
},
|
||||
};
|
||||
|
||||
export const Disabled = {
|
||||
args: {
|
||||
children: "Unavailable option",
|
||||
disabled: true,
|
||||
size: "medium",
|
||||
},
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
import LanguageSwitcher from "../../app/components/localization/LanguageSwitcher";
|
||||
|
||||
export default {
|
||||
title: "Components/Localization/LanguageSwitcher",
|
||||
component: LanguageSwitcher,
|
||||
parameters: {
|
||||
layout: "centered",
|
||||
},
|
||||
argTypes: {
|
||||
className: {
|
||||
control: "text",
|
||||
description: "Optional wrapper className",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const Default = {
|
||||
args: {},
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
import React, { useState } from "react";
|
||||
import AskOrganizerInquiryModal from "../../app/components/modals/AskOrganizerInquiry";
|
||||
import Button from "../../app/components/buttons/Button";
|
||||
|
||||
export default {
|
||||
title: "Components/Modals/AskOrganizerInquiry",
|
||||
component: AskOrganizerInquiryModal,
|
||||
};
|
||||
|
||||
function AskOrganizerInquiryStoryHost() {
|
||||
const [isOpen, setIsOpen] = useState(true);
|
||||
|
||||
return (
|
||||
<div className="p-8">
|
||||
<Button
|
||||
buttonType="filled"
|
||||
palette="default"
|
||||
size="medium"
|
||||
onClick={() => setIsOpen(true)}
|
||||
>
|
||||
Ask an organizer
|
||||
</Button>
|
||||
<AskOrganizerInquiryModal
|
||||
isOpen={isOpen}
|
||||
onClose={() => setIsOpen(false)}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export const Default = {
|
||||
render: () => <AskOrganizerInquiryStoryHost />,
|
||||
};
|
||||
@@ -28,10 +28,6 @@ export default {
|
||||
control: "text",
|
||||
description: "Text for the call-to-action button",
|
||||
},
|
||||
buttonHref: {
|
||||
control: "text",
|
||||
description: "URL for the button link",
|
||||
},
|
||||
variant: {
|
||||
control: { type: "select" },
|
||||
options: ["centered", "left-aligned", "compact", "inverse", "use-case-detail"],
|
||||
@@ -103,15 +99,3 @@ export const UseCaseDetail = {
|
||||
),
|
||||
],
|
||||
};
|
||||
|
||||
/** Legacy: CTA is a link (no inquiry modal). */
|
||||
export const LinkCta = {
|
||||
args: {
|
||||
title: "Still have questions?",
|
||||
subtitle: "Get answers from an experienced organizer",
|
||||
buttonText: "Ask an organizer",
|
||||
buttonHref: "/contact",
|
||||
variant: "centered",
|
||||
onContactClick: (data) => console.log("Contact clicked:", data),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import Book from "../../app/components/sections/Book";
|
||||
import { getAssetPath, governanceBookletPath } from "../../lib/assetUtils";
|
||||
import messages from "../../messages/en/pages/about.json";
|
||||
|
||||
export default {
|
||||
title: "Components/Sections/Book",
|
||||
component: Book,
|
||||
parameters: {
|
||||
layout: "fullscreen",
|
||||
backgrounds: { default: "dark" },
|
||||
},
|
||||
};
|
||||
|
||||
export const Default = {
|
||||
args: {
|
||||
title: messages.book.title,
|
||||
description: messages.book.description,
|
||||
buttonText: messages.book.buttonText,
|
||||
buttonHref: getAssetPath(governanceBookletPath()),
|
||||
imageAlt: messages.book.imageAlt,
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
import TripleTextBlock from "../../app/components/type/TripleTextBlock";
|
||||
import messages from "../../messages/en/pages/about.json";
|
||||
|
||||
export default {
|
||||
title: "Components/Type/TripleTextBlock",
|
||||
component: TripleTextBlock,
|
||||
parameters: { layout: "fullscreen" },
|
||||
};
|
||||
|
||||
export const Default = {
|
||||
args: {
|
||||
columns: messages.tripleTextBlock.columns,
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user