From 5e2cb0e3a854a17f93ae419632f4cf2232b737f9 Mon Sep 17 00:00:00 2001 From: AkaraChen <85140972+AkaraChen@users.noreply.github.com> Date: Wed, 4 Dec 2024 17:34:55 +0800 Subject: [PATCH] feat: add base skeleton component (#11339) --- web/app/components/base/skeleton/index.tsx | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 web/app/components/base/skeleton/index.tsx diff --git a/web/app/components/base/skeleton/index.tsx b/web/app/components/base/skeleton/index.tsx new file mode 100644 index 0000000000..5f29c22f7c --- /dev/null +++ b/web/app/components/base/skeleton/index.tsx @@ -0,0 +1,47 @@ +import type { ComponentProps, FC } from 'react' +import classNames from '@/utils/classnames' + +type SkeletonProps = ComponentProps<'div'> + +export const SkeletonContanier: FC = (props) => { + const { className, children, ...rest } = props + return ( +
+ {children} +
+ ) +} + +export const SkeletonRow: FC = (props) => { + const { className, children, ...rest } = props + return ( +
+ {children} +
+ ) +} + +export const SkeletonRectangle: FC = (props) => { + const { className, children, ...rest } = props + return ( +
+ {children} +
+ ) +} + +export const SkeletonPoint: FC = () => +
ยท
+ +/** Usage + * + * + * + * + * + * + * + * + * + * + */