DocSpace-buildtools/packages/asc-web-common/components/Loaders/GroupLoader/GroupLoader.js
2021-02-26 00:19:45 +03:00

94 lines
2.5 KiB
JavaScript

import React from "react";
import PropTypes from "prop-types";
import { StyledGroup, StyledLastRow, StyledSpacer } from "./StyledGroupLoader";
import RectangleLoader from "../RectangleLoader";
const GroupLoader = ({ id, className, style, ...rest }) => {
const {
title,
borderRadius,
backgroundColor,
foregroundColor,
backgroundOpacity,
foregroundOpacity,
speed,
animate,
} = rest;
return (
<StyledGroup id={id} className={className} style={style}>
<RectangleLoader
title={title}
borderRadius={borderRadius}
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<RectangleLoader
title={title}
borderRadius={borderRadius}
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<RectangleLoader
title={title}
borderRadius={borderRadius}
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<StyledSpacer />
<StyledLastRow>
<RectangleLoader
title={title}
width="100"
height="36"
borderRadius={borderRadius}
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<RectangleLoader
title={title}
width="100"
height="36"
borderRadius={borderRadius}
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
</StyledLastRow>
</StyledGroup>
);
};
GroupLoader.propTypes = {
id: PropTypes.string,
className: PropTypes.string,
style: PropTypes.object,
};
GroupLoader.defaultProps = {
id: undefined,
className: undefined,
style: undefined,
};
export default GroupLoader;