Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

813 B
Raw Blame
import type { Meta, StoryObj } from "@storybook/react-vite";
import ErrorMessage from "@editor/auth/ui/ErrorMessage";
import "@editor/auth/ui/auth.css";

/**
 * The inline error banner the auth forms render when a submission fails
 */
const meta: Meta<typeof ErrorMessage> = {
  title: "Auth/Error Message",
  component: ErrorMessage,
  parameters: { layout: "centered" },
  args: {
    error: "Invalid email or password.",
  },
};
export default meta;
type Story = StoryObj<typeof ErrorMessage>;

export const Default: Story = {};

export const LongMessage: Story = {
  args: {
    error:
      "We couldn't sign you in because your account has been temporarily locked after too many failed attempts. Please try again in a few minutes.",
  },
};

export const Empty: Story = {
  args: {
    error: null,
  },
};