update skeleton layout
This commit is contained in:
1 parent
8df076744b
commit
fa809d7bfd
1 file changed
+8
-2
@@ -4,15 +4,21 @@ import SkeletonLayout from "./skeleton";
|
|||||||
// Utils
|
// Utils
|
||||||
import { useTheme } from "@mui/material/styles";
|
import { useTheme } from "@mui/material/styles";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
const StatusBoxes = ({ shouldRender, children }) => {
|
const StatusBoxes = ({ shouldRender, flexWrap = "nowrap", children }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
if (!shouldRender) {
|
if (!shouldRender) {
|
||||||
return <SkeletonLayout numBoxes={children?.length ?? 1} />;
|
return (
|
||||||
|
<SkeletonLayout
|
||||||
|
numBoxes={children?.length ?? 1}
|
||||||
|
flexWrap={flexWrap}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
|
flexWrap={flexWrap}
|
||||||
gap={theme.spacing(8)}
|
gap={theme.spacing(8)}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
Reference in new issue
Block a user