* ✨ feat: add Skeleton component with respective stories in propel * 🚨 fix: lint issues * ♻️ refactor : enhance Skeleton component with improved props and structure * ✨ feat: add Skeleton component entry to package.json * 🚨 fix: lint * ♻️ refactor: rename Skeleton to skeleton * fix: rename fixes * ♻️ refactor: rename skeleton * 🚨 fix: lint * ♻️ refactor: add skeleton entry to tsdown config and package.json * ♻️ refactor: sorted propel exports --------- Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
33 lines
812 B
TypeScript
33 lines
812 B
TypeScript
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
import { Skeleton } from "./index";
|
|
|
|
const meta: Meta<typeof Skeleton> = {
|
|
title: "Components/Skeleton",
|
|
component: Skeleton,
|
|
parameters: {
|
|
layout: "centered",
|
|
},
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
export const Default: Story = {
|
|
render: () => (
|
|
<Skeleton className="w-80 flex flex-col gap-2">
|
|
<Skeleton.Item height="40px" width="100%" />
|
|
</Skeleton>
|
|
),
|
|
};
|
|
|
|
export const Card: Story = {
|
|
render: () => (
|
|
<Skeleton className="w-80 flex flex-col gap-4">
|
|
<Skeleton.Item height="200px" width="100%" />
|
|
<div className="flex flex-col gap-2">
|
|
<Skeleton.Item height="20px" width="50%" />
|
|
<Skeleton.Item height="20px" width="30%" />
|
|
</div>
|
|
</Skeleton>
|
|
),
|
|
};
|