Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui) Add advanced list story #1361

Merged
merged 4 commits into from
Jun 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions packages/ui/src/components/List/List.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Meta, StoryFn } from "@storybook/react";
import { HiCheckCircle } from "react-icons/hi";
import { Avatar } from "../Avatar";
import type { ListProps } from "./List";
import { List } from "./List";

Expand Down Expand Up @@ -109,3 +110,89 @@ WithIconList.args = {
</>
),
};

export const AdvancedList = Template.bind({});
AdvancedList.storyName = "Advanced";
AdvancedList.args = {
unstyled: true,
className: "max-w-md divide-y divide-gray-200 dark:divide-gray-700",
children: (
<>
<List.Item className="pb-3 sm:pb-4">
<div className="flex items-center space-x-4 rtl:space-x-reverse">
<Avatar
img="https://flowbite.com/docs/images/people/profile-picture-1.jpg"
alt="Neil image"
rounded
size="sm"
/>
<div className="min-w-0 flex-1">
<p className="truncate text-sm font-medium text-gray-900 dark:text-white">Neil Sims</p>
<p className="truncate text-sm text-gray-500 dark:text-gray-400">email@flowbite.com</p>
</div>
<div className="inline-flex items-center text-base font-semibold text-gray-900 dark:text-white">$320</div>
</div>
</List.Item>
<List.Item className="py-3 sm:py-4">
<div className="flex items-center space-x-4 rtl:space-x-reverse">
<Avatar
img="https://flowbite.com/docs/images/people/profile-picture-3.jpg"
alt="Neil image"
rounded
size="sm"
/>
<div className="min-w-0 flex-1">
<p className="truncate text-sm font-medium text-gray-900 dark:text-white">Bonnie Green</p>
<p className="truncate text-sm text-gray-500 dark:text-gray-400">email@flowbite.com</p>
</div>
<div className="inline-flex items-center text-base font-semibold text-gray-900 dark:text-white">$3467</div>
</div>
</List.Item>
<List.Item className="py-3 sm:py-4">
<div className="flex items-center space-x-4 rtl:space-x-reverse">
<Avatar
img="https://flowbite.com/docs/images/people/profile-picture-2.jpg"
alt="Neil image"
rounded
size="sm"
/>
<div className="min-w-0 flex-1">
<p className="truncate text-sm font-medium text-gray-900 dark:text-white">Michael Gough</p>
<p className="truncate text-sm text-gray-500 dark:text-gray-400">email@flowbite.com</p>
</div>
<div className="inline-flex items-center text-base font-semibold text-gray-900 dark:text-white">$67</div>
</div>
</List.Item>
<List.Item className="py-3 sm:py-4">
<div className="flex items-center space-x-4 rtl:space-x-reverse">
<Avatar
img="https://flowbite.com/docs/images/people/profile-picture-5.jpg"
alt="Neil image"
rounded
size="sm"
/>
<div className="min-w-0 flex-1">
<p className="truncate text-sm font-medium text-gray-900 dark:text-white">Thomas Lean</p>
<p className="truncate text-sm text-gray-500 dark:text-gray-400">email@flowbite.com</p>
</div>
<div className="inline-flex items-center text-base font-semibold text-gray-900 dark:text-white">$2367</div>
</div>
</List.Item>
<List.Item className="pb-0 pt-3 sm:pt-4">
<div className="flex items-center space-x-4 rtl:space-x-reverse">
<Avatar
img="https://flowbite.com/docs/images/people/profile-picture-4.jpg"
alt="Neil image"
rounded
size="sm"
/>
<div className="min-w-0 flex-1">
<p className="truncate text-sm font-medium text-gray-900 dark:text-white">Lana Byrd</p>
<p className="truncate text-sm text-gray-500 dark:text-gray-400">email@flowbite.com</p>
</div>
<div className="inline-flex items-center text-base font-semibold text-gray-900 dark:text-white">$367</div>
</div>
</List.Item>
</>
),
};
Loading