import React from 'react';
import './Placeholder.less';
function getPlaceholder(rowCount, className) {
const rows = [];
for (let i = 0; i < rowCount; i++) {
rows.push(
);
}
const clazz = `place ${className == null ? '' : className}`;
return (
);
}
export default function Placeholder({ rows = 3, ready = false, children, customPlaceholder, className }) {
if (!ready) {
if (customPlaceholder != null) {
return customPlaceholder;
}
return getPlaceholder(rows, className);
}
return children;
}