blob: 778b5e1f7ac24199565837764747dece01b75eee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
import React from "react";
import Skeleton, { SkeletonTheme } from "react-loading-skeleton";
import "react-loading-skeleton/dist/skeleton.css";
interface StopItemSkeletonProps {
showId?: boolean;
stopId?: string;
}
const StopItemSkeleton: React.FC<StopItemSkeletonProps> = ({
showId = false,
stopId,
}) => {
return (
<SkeletonTheme
baseColor="var(--skeleton-base)"
highlightColor="var(--skeleton-highlight)"
>
<li className="list-item">
<div className="list-item-link">
<span>{showId && stopId && <>({stopId}) </>}</span>
<Skeleton
width={showId ? "60%" : "80%"}
style={{ display: "inline-block" }}
/>
<div className="line-icons" style={{ marginTop: "4px" }}>
<Skeleton
count={3}
width="30px"
height="20px"
inline={true}
style={{ marginRight: "0.5rem" }}
/>
</div>
</div>
</li>
</SkeletonTheme>
);
};
export default StopItemSkeleton;
|