diff --git a/web/app/components/base/skeleton/index.tsx b/web/app/components/base/skeleton/index.tsx index 5f29c22f7c..a68a80f304 100644 --- a/web/app/components/base/skeleton/index.tsx +++ b/web/app/components/base/skeleton/index.tsx @@ -3,7 +3,7 @@ import classNames from '@/utils/classnames' type SkeletonProps = ComponentProps<'div'> -export const SkeletonContanier: FC = (props) => { +export const SkeletonContainer: FC = (props) => { const { className, children, ...rest } = props return (
@@ -24,7 +24,7 @@ export const SkeletonRow: FC = (props) => { export const SkeletonRectangle: FC = (props) => { const { className, children, ...rest } = props return ( -
+
{children}
) diff --git a/web/app/components/plugins/card/base/placeholder.tsx b/web/app/components/plugins/card/base/placeholder.tsx index 96b83f152e..62f373f922 100644 --- a/web/app/components/plugins/card/base/placeholder.tsx +++ b/web/app/components/plugins/card/base/placeholder.tsx @@ -1,5 +1,6 @@ import { Group } from '../../../base/icons/src/vender/other' import Title from './title' +import { SkeletonContainer, SkeletonPoint, SkeletonRectangle, SkeletonRow } from '@/app/components/base/skeleton' import cn from '@/utils/classnames' type Props = { @@ -17,7 +18,7 @@ const Placeholder = ({ }: Props) => { return (
-
+
@@ -25,24 +26,24 @@ const Placeholder = ({
-
-
- {loadingFileName ? ( - - ) : ( - <LoadingPlaceholder className="w-[260px]" /> - )} - </div> - <div className={cn('flex items-center h-4 space-x-0.5')}> - <LoadingPlaceholder className="w-[41px]" /> - <span className='shrink-0 text-text-quaternary system-xs-regular'> - ยท - </span> - <LoadingPlaceholder className="w-[180px]" /> - </div> + <div className="grow"> + <SkeletonContainer> + <div className="flex items-center h-5"> + {loadingFileName ? ( + <Title title={loadingFileName} /> + ) : ( + <SkeletonRectangle className="w-[260px]" /> + )} + </div> + <SkeletonRow className="h-4"> + <SkeletonRectangle className="w-[41px]" /> + <SkeletonPoint /> + <SkeletonRectangle className="w-[180px]" /> + </SkeletonRow> + </SkeletonContainer> </div> - </div> - <LoadingPlaceholder className="mt-3 w-[420px]" /> + </SkeletonRow> + <SkeletonRectangle className="mt-3 w-[420px]" /> </div> ) }