2024-12-19 18:33:13 +08:00
|
|
|
import React from "react";
|
|
|
|
import { Image } from "antd-mobile";
|
|
|
|
export default function OwnIcon({
|
|
|
|
src,
|
|
|
|
width = "100%",
|
|
|
|
height = "100%",
|
|
|
|
className,
|
|
|
|
outClassName,
|
|
|
|
imageClassName,
|
2024-12-20 20:47:20 +08:00
|
|
|
...others
|
2024-12-19 18:33:13 +08:00
|
|
|
}) {
|
|
|
|
return (
|
|
|
|
<div
|
|
|
|
className={`flex flex-col justify-center items-center relative ${outClassName}`}
|
|
|
|
>
|
2025-01-04 09:25:18 +08:00
|
|
|
<div className={`${className} z-[0]`}>
|
2024-12-19 18:33:13 +08:00
|
|
|
<Image
|
|
|
|
height={height}
|
|
|
|
width={width}
|
|
|
|
fit="cover"
|
|
|
|
className={imageClassName}
|
|
|
|
src={process.env.NEXT_PUBLIC_WEB_ASSETS_URL + src}
|
|
|
|
// placeholder=""
|
|
|
|
fallback={
|
|
|
|
<div className="w-full h-full bg-gray-700 rounded-full absolute top-0 scale-75 z-0 animate-pulse" />
|
|
|
|
}
|
|
|
|
placeholder={
|
|
|
|
<div className="w-full h-full bg-gray-700 rounded-full absolute top-0 scale-75 z-0 animate-pulse" />
|
|
|
|
}
|
2024-12-20 20:47:20 +08:00
|
|
|
{...others}
|
2024-12-19 18:33:13 +08:00
|
|
|
/>
|
|
|
|
<div className="w-full h-full bg-transparent absolute top-0 z-20" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|