mirror of
https://github.com/langgenius/dify.git
synced 2026-02-24 18:05:11 +00:00
Some checks failed
autofix.ci / autofix (push) Has been cancelled
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/amd64, build-api-amd64) (push) Has been cancelled
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/arm64, build-api-arm64) (push) Has been cancelled
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/amd64, build-web-amd64) (push) Has been cancelled
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/arm64, build-web-arm64) (push) Has been cancelled
Build and Push API & Web / create-manifest (api, DIFY_API_IMAGE_NAME, merge-api-images) (push) Has been cancelled
Build and Push API & Web / create-manifest (web, DIFY_WEB_IMAGE_NAME, merge-web-images) (push) Has been cancelled
Main CI Pipeline / Check Changed Files (push) Has been cancelled
Main CI Pipeline / API Tests (push) Has been cancelled
Main CI Pipeline / Web Tests (push) Has been cancelled
Main CI Pipeline / Style Check (push) Has been cancelled
Main CI Pipeline / VDB Tests (push) Has been cancelled
Main CI Pipeline / DB Migration Test (push) Has been cancelled
Trigger i18n Sync on Push / trigger (push) Has been cancelled
60 lines
2.0 KiB
TypeScript
60 lines
2.0 KiB
TypeScript
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
|
|
import {
|
|
SkeletonContainer,
|
|
SkeletonPoint,
|
|
SkeletonRectangle,
|
|
SkeletonRow,
|
|
} from '.'
|
|
|
|
const SkeletonDemo = () => {
|
|
return (
|
|
<div className="flex w-full max-w-xl flex-col gap-6 rounded-2xl border border-divider-subtle bg-components-panel-bg p-6">
|
|
<div className="text-xs uppercase tracking-[0.18em] text-text-tertiary">Loading skeletons</div>
|
|
<div className="space-y-4 rounded-xl border border-divider-subtle bg-background-default-subtle p-4">
|
|
<SkeletonContainer>
|
|
<SkeletonRow>
|
|
<SkeletonRectangle className="h-4 w-32 rounded-md" />
|
|
<SkeletonPoint />
|
|
<SkeletonRectangle className="h-4 w-20 rounded-md" />
|
|
</SkeletonRow>
|
|
<SkeletonRow>
|
|
<SkeletonRectangle className="h-3 w-full" />
|
|
</SkeletonRow>
|
|
<SkeletonRow>
|
|
<SkeletonRectangle className="h-3 w-5/6" />
|
|
</SkeletonRow>
|
|
</SkeletonContainer>
|
|
</div>
|
|
<div className="space-y-3 rounded-xl border border-divider-subtle bg-background-default-subtle p-4">
|
|
<SkeletonRow className="items-start">
|
|
<SkeletonRectangle className="mr-4 h-10 w-10 rounded-full" />
|
|
<SkeletonContainer className="w-full">
|
|
<SkeletonRectangle className="h-3 w-1/3" />
|
|
<SkeletonRectangle className="h-3 w-full" />
|
|
<SkeletonRectangle className="h-3 w-3/4" />
|
|
</SkeletonContainer>
|
|
</SkeletonRow>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
const meta = {
|
|
title: 'Base/Feedback/Skeleton',
|
|
component: SkeletonDemo,
|
|
parameters: {
|
|
layout: 'centered',
|
|
docs: {
|
|
description: {
|
|
component: 'Composable skeleton primitives (container, row, rectangle, point) to sketch loading states for panels and lists.',
|
|
},
|
|
},
|
|
},
|
|
tags: ['autodocs'],
|
|
} satisfies Meta<typeof SkeletonDemo>
|
|
|
|
export default meta
|
|
type Story = StoryObj<typeof meta>
|
|
|
|
export const Playground: Story = {}
|