televerse-skeleton
Version:
A lightweight and customizable loading skeleton library for React components. This library provides a collection of reusable loading skeleton components for displaying placeholders while content is being fetched or loaded from an external source. The loa
67 lines (62 loc) • 1.58 kB
JSX
import styles from "../styles/visitingSchedule.module.css";
import DivLoadingSkeleton from "./DivLoadingSkeleton";
import TableLoadingSkeleton from "./TableLoadingSkeleton";
const VisitingScheduleLoadingSkeleton = ({
width,
height,
bgColor,
fgColor,
typeOfAnimation,
speedInS,
bRadius,
theme,
lineH,
lineW,
rowsNumber,
rowH,
bRadiusBottom,
}) => {
const cardStyle = {
width,
height,
background: theme === "dark" ? "#232330" : "#F9FBE7",
borderRadius: bRadius,
};
const renderDivLoadingSkeleton = () => {
return (
<DivLoadingSkeleton
width={lineW}
height={lineH}
fgColor={fgColor}
bgColor={bgColor}
typeOfAnimation={typeOfAnimation}
speedInS={speedInS}
bRadius={bRadius}
/>
);
};
return (
<div className={styles.card} style={cardStyle}>
<div className={styles.header}>
{renderDivLoadingSkeleton()}
{renderDivLoadingSkeleton()}
{renderDivLoadingSkeleton()}
</div>
<div className={styles.break}></div>
<div className={styles.data}>
<TableLoadingSkeleton
width={width}
height={rowH}
rowsNumber={rowsNumber}
bgColor={bgColor}
fgColor={fgColor}
speedInS={speedInS}
typeOfAnimation={typeOfAnimation}
bRadius={bRadius}
bRadiusBottom={bRadiusBottom}
/>
</div>
</div>
);
};
export default VisitingScheduleLoadingSkeleton;