[WEB-5083] chore: add stories to propel #7888

This commit is contained in:
Aaron 2025-10-06 08:18:52 -07:00 committed by GitHub
parent 0cca31ef2e
commit cbcb026e9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 6786 additions and 874 deletions

View file

@ -2,26 +2,19 @@ import type { Meta, StoryObj } from "@storybook/react";
import React from "react";
import { Sortable } from "./sortable";
const meta: Meta<typeof Sortable> = {
type StoryItem = { id: string; name: string };
const meta: Meta<typeof Sortable<StoryItem>> = {
title: "Sortable",
component: Sortable,
};
export default meta;
type StoryItem = { id: string; name: string };
type Story = StoryObj<typeof Sortable<StoryItem>>;
const data = [
{ id: "1", name: "John Doe" },
{ id: "2", name: "Satish" },
{ id: "3", name: "Alice" },
{ id: "4", name: "Bob" },
{ id: "5", name: "Charlie" },
];
export const Default: Story = {
args: {
data,
data: [
{ id: "1", name: "John Doe" },
{ id: "2", name: "Satish" },
{ id: "3", name: "Alice" },
{ id: "4", name: "Bob" },
{ id: "5", name: "Charlie" },
],
render: (item: StoryItem) => (
// <Draggable data={item} className="rounded-lg">
<div className="border ">{item.name}</div>
@ -31,3 +24,9 @@ export const Default: Story = {
keyExtractor: (item) => item.id,
},
};
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {};