Files
Folo/apps/renderer/src/modules/entry-content/loading.tsx
T
2024-09-18 22:03:51 +08:00

18 lines
608 B
TypeScript

import { Avatar, AvatarImage } from "~/components/ui/avatar"
import { LoadingCircle, LoadingWithIcon } from "~/components/ui/loading"
import { getUrlIcon } from "~/lib/utils"
export const EntryContentLoading = (props: { icon?: string }) => {
if (!props.icon) {
return <LoadingWithIcon size="large" icon={<i className="i-mgc-sparkles-2-cute-re" />} />
}
return (
<div className="center mb-14 flex flex-col gap-4">
<Avatar className="animate-pulse rounded-sm">
<AvatarImage src={getUrlIcon(props.icon).src} />
</Avatar>
<LoadingCircle size="medium" />
</div>
)
}