import type { Meta, StoryObj } from "@storybook/react"; import { Book, Code, Mail, Rocket, Settings, Users } from "lucide-react"; import { SuccessDisplay } from "./SuccessDisplay"; const meta: Meta = { title: "Widgets/Onboarding/Display/SuccessDisplay", component: SuccessDisplay, parameters: { layout: "centered", }, tags: ["autodocs"], decorators: [ (Story) => (
), ], }; export default meta; type Story = StoryObj; // ============================================================================= // DEFAULT // ============================================================================= export const Default: Story = { args: { title: "You're all set!", message: "Your setup is complete. Here's what you can do next.", }, }; // ============================================================================= // WITH NEXT STEPS // ============================================================================= export const WithNextSteps: Story = { name: "With Next Steps", args: { title: "Welcome aboard!", message: "Your account has been created successfully.", nextSteps: [ { title: "Complete your profile", description: "Add a photo and bio to personalize your account", icon: , actionText: "Edit Profile", onAction: () => alert("Edit profile clicked"), }, { title: "Explore the dashboard", description: "Get familiar with the main features", icon: , actionText: "Go to Dashboard", onAction: () => alert("Dashboard clicked"), }, { title: "Read the documentation", description: "Learn how to get the most out of our platform", icon: , optional: true, }, ], }, }; // ============================================================================= // CUSTOM ICON // ============================================================================= export const CustomIcon: Story = { name: "Custom Icon", args: { title: "Email Verified!", message: "Your email address has been confirmed.", icon: , nextSteps: [ { title: "Set up two-factor authentication", description: "Add an extra layer of security to your account", icon: , actionText: "Enable 2FA", onAction: () => alert("2FA clicked"), }, ], }, }; // ============================================================================= // SIMPLE SUCCESS // ============================================================================= export const SimpleSuccess: Story = { name: "Simple Success", args: { title: "Changes Saved", message: "Your preferences have been updated successfully.", }, }; // ============================================================================= // DEVELOPER ONBOARDING // ============================================================================= export const DeveloperOnboarding: Story = { name: "Developer Onboarding", args: { title: "API Key Generated!", message: "Your development environment is ready to go.", nextSteps: [ { title: "Copy your API key", description: "Store it securely - you won't be able to see it again", icon: , actionText: "Copy Key", onAction: () => alert("Copy clicked"), }, { title: "Install the SDK", description: "npm install @company/sdk", icon: , }, { title: "Read the API docs", description: "Explore endpoints and examples", icon: , actionText: "View Docs", onAction: () => alert("Docs clicked"), optional: true, }, ], }, }; // ============================================================================= // WITH OPTIONAL STEPS // ============================================================================= export const WithOptionalSteps: Story = { name: "With Optional Steps", args: { title: "Setup Complete!", message: "You're ready to start using the platform.", nextSteps: [ { title: "Invite your team", description: "Collaborate with your colleagues", icon: , actionText: "Invite", onAction: () => alert("Invite clicked"), }, { title: "Connect integrations", description: "Sync with your existing tools", icon: , optional: true, }, { title: "Watch the tutorial", description: "A 5-minute overview of key features", icon: , optional: true, }, ], }, }; // ============================================================================= // MANY NEXT STEPS // ============================================================================= export const ManyNextSteps: Story = { name: "Many Next Steps", args: { title: "Project Created!", message: "Your new project is ready. Here are some things you can do:", nextSteps: [ { title: "Configure settings", icon: , actionText: "Configure", onAction: () => {}, }, { title: "Add team members", icon: , actionText: "Add", onAction: () => {}, }, { title: "Set up CI/CD", icon: , optional: true, }, { title: "Read best practices", icon: , optional: true, }, ], }, };