Skip to content

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

1.2 KB
Raw Blame
import { useState } from "react";
import type { Meta, StoryObj } from "@storybook/react-vite";
import { buildDocsNav } from "@processor/mocks/docs";
import { DocsNav, DocsNavSkeleton } from "@editor-core/components/docs/DocsNav";
import "@editor-core/components/docs/DeveloperDocs.css";

const meta: Meta<typeof DocsNav> = {
  title: "Portal/DeveloperDocs/DocsNav",
  component: DocsNav,
  parameters: { layout: "padded" },
  decorators: [
    (S) => (
      <div style={{ maxWidth: "15rem" }}>
        <S />
      </div>
    ),
  ],
};
export default meta;
type Story = StoryObj<typeof DocsNav>;

const sections = buildDocsNav();

export const Default: Story = {
  render: () => {
    const [active, setActive] = useState("quickstart");
    return <DocsNav sections={sections} active={active} onSelect={setActive} />;
  },
};

/** Webhooks ("Beta") and Agent skills ("New") exercise both badge tones. */
export const BadgedLeafActive: Story = {
  render: () => {
    const [active, setActive] = useState("skill-catalog");
    return <DocsNav sections={sections} active={active} onSelect={setActive} />;
  },
};

export const Loading: StoryObj = {
  render: () => <DocsNavSkeleton />,
};