cal.pub0.org/packages/ui/components/skeleton/skeleton.stories.mdx

45 lines
1.1 KiB
Plaintext
Raw Normal View History

2023-08-15 00:42:10 +00:00
import { Canvas, Meta, Story, ArgsTable } from "@storybook/addon-docs";
2023-08-15 00:42:10 +00:00
import {
Examples,
Example,
Note,
Title,
VariantsTable,
VariantColumn,
RowTitles,
CustomArgsTable,
} from "@calcom/storybook/components";
2023-08-15 00:42:10 +00:00
import { Skeleton, SkeletonAvatar, SkeletonText, SkeletonButton, SkeletonContainer } from "./";
2023-08-15 00:42:10 +00:00
<Meta title="UI/Skeleton" component={Skeleton} />
2023-08-15 00:42:10 +00:00
<Title title="Skeleton" suffix="Brief" subtitle="Version 2.0 — Last Update: 22 Aug 2022" />
## Definition
2023-08-15 00:42:10 +00:00
Skeletons are used as a placeholder to the content while the content is being loaded. It is used to improve the user experience by providing a visual cue that the content is loading.
## Structure
<CustomArgsTable of={Skeleton} />
2023-08-15 00:42:10 +00:00
<Examples title="Skeleton Avatar">
<Example title="Primary">
<SkeletonAvatar className="h-8 w-8" />
</Example>
</Examples>
2023-08-15 00:42:10 +00:00
<Examples title="Skeleton Text">
<Example title="Primary">
2023-08-15 00:42:10 +00:00
<SkeletonText className="h-4 w-32" />
</Example>
</Examples>
2023-08-15 00:42:10 +00:00
<Examples title="Skeleton Button">
<Example title="Primary">
2023-08-15 00:42:10 +00:00
<SkeletonButton className="h-8 w-32" />
</Example>
</Examples>