import Create from "../../app/components/modals/Create";
import TextInput from "../../app/components/controls/TextInput";
export default {
title: "Components/Modals/Create",
component: Create,
parameters: {
layout: "fullscreen",
docs: {
description: {
component:
"Create dialog component with portal rendering, keyboard navigation, and focus trap. Supports multi-step workflows with stepper integration. Used for the create flow in the application.",
},
},
},
argTypes: {
isOpen: {
control: { type: "boolean" },
},
title: {
control: { type: "text" },
},
description: {
control: { type: "text" },
},
showBackButton: {
control: { type: "boolean" },
},
showNextButton: {
control: { type: "boolean" },
},
nextButtonDisabled: {
control: { type: "boolean" },
},
backdropVariant: {
control: { type: "select" },
options: ["default", "blurredYellow"],
},
currentStep: {
control: { type: "number", min: 1, max: 5 },
},
totalSteps: {
control: { type: "number", min: 1, max: 5 },
},
},
tags: ["autodocs"],
};
const Template = (args) => {
return (
{}}>
{args.children}
);
};
export const Default = {
args: {
isOpen: true,
title: "What do you call your group's new policy?",
description: "You can also combine or add new approaches to the list",
children: (
),
showBackButton: true,
showNextButton: true,
backButtonText: "Back",
nextButtonText: "Next",
nextButtonDisabled: false,
},
render: Template,
};
export const WithStepper = {
args: {
isOpen: true,
title: "What do you call your group's new policy?",
description: "You can also combine or add new approaches to the list",
children: (
),
showBackButton: true,
showNextButton: true,
backButtonText: "Back",
nextButtonText: "Next",
nextButtonDisabled: false,
currentStep: 1,
totalSteps: 3,
},
render: Template,
};
export const Step2 = {
args: {
isOpen: true,
title: "How should conflicts be resolved?",
description: "You can also combine or add new approaches to the list",
children: (
),
showBackButton: true,
showNextButton: true,
backButtonText: "Back",
nextButtonText: "Next",
nextButtonDisabled: false,
currentStep: 2,
totalSteps: 3,
},
render: Template,
};
export const Step3 = {
args: {
isOpen: true,
title: "Final step",
description: "Review your settings",
children: (
Review your policy configuration
),
showBackButton: true,
showNextButton: true,
backButtonText: "Back",
nextButtonText: "Finish",
nextButtonDisabled: false,
currentStep: 3,
totalSteps: 3,
},
render: Template,
};
export const WithCustomHeader = {
args: {
isOpen: true,
headerContent: Custom header
,
children: (
When headerContent is provided, the default title and description are
not shown.
),
showBackButton: false,
showNextButton: true,
nextButtonText: "Continue",
},
render: Template,
};
export const WithoutFooter = {
args: {
isOpen: true,
title: "Simple Create Dialog",
description: "This create dialog has no footer buttons",
children: (
Modal content without footer
),
showBackButton: false,
showNextButton: false,
},
render: Template,
};
export const LoginYellowBackdrop = {
args: {
isOpen: true,
title: "Horizontalism",
description:
"Edit or add to this description to describe what this value means to your community.",
backdropVariant: "blurredYellow",
children: (
Core value detail body (yellow blurred overlay like Login).
),
showBackButton: false,
showNextButton: true,
nextButtonText: "Add Value",
nextButtonDisabled: false,
},
render: Template,
};
export const NextButtonDisabled = {
args: {
isOpen: true,
title: "What do you call your group's new policy?",
description: "You can also combine or add new approaches to the list",
children: (
),
showBackButton: true,
showNextButton: true,
backButtonText: "Back",
nextButtonText: "Next",
nextButtonDisabled: true,
currentStep: 1,
totalSteps: 3,
},
render: Template,
};