DocSpace-client/packages/asc-web-common/components/Loaders/SectionHeaderLoader/SectionHeaderLoader.js

95 lines
2.4 KiB
JavaScript
Raw Normal View History

2020-11-05 08:15:15 +00:00
import React from "react";
2020-11-10 14:29:11 +00:00
import PropTypes from "prop-types";
import {
StyledContainer,
StyledBox1,
StyledBox2,
StyledSpacer,
} from "./StyledSectionHeaderLoader";
2020-11-06 12:20:06 +00:00
import RectangleLoader from "../RectangleLoader/index";
2020-11-05 08:15:15 +00:00
2020-11-10 14:29:11 +00:00
const SectionHeaderLoader = ({ id, className, style, ...rest }) => {
const {
title,
borderRadius,
backgroundColor,
foregroundColor,
backgroundOpacity,
foregroundOpacity,
speed,
animate,
} = rest;
2020-11-05 08:15:15 +00:00
return (
2020-11-10 14:29:11 +00:00
<StyledContainer id={id} className={className} style={style}>
2020-11-05 08:15:15 +00:00
<StyledBox1>
2020-11-10 14:29:11 +00:00
<RectangleLoader
title={title}
width="17"
height="17"
borderRadius={borderRadius}
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<RectangleLoader
title={title}
width="67"
height="17"
borderRadius={borderRadius}
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
2020-11-05 08:15:15 +00:00
</StyledBox1>
<StyledSpacer />
<StyledBox2>
2020-11-10 14:29:11 +00:00
<RectangleLoader
title={title}
width="17"
height="17"
borderRadius={borderRadius}
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<RectangleLoader
title={title}
width="17"
height="17"
borderRadius={borderRadius}
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
2020-11-05 08:15:15 +00:00
</StyledBox2>
</StyledContainer>
);
};
2020-11-10 14:29:11 +00:00
SectionHeaderLoader.propTypes = {
id: PropTypes.string,
className: PropTypes.string,
style: PropTypes.object,
};
SectionHeaderLoader.defaultProps = {
id: undefined,
className: undefined,
style: undefined,
};
2020-11-05 08:15:15 +00:00
export default SectionHeaderLoader;