DocSpace-buildtools/web/ASC.Web.Common/src/components/Loaders/ArticleHeaderLoader/ArticleHeaderLoader.js

59 lines
1.2 KiB
JavaScript
Raw Normal View History

2020-11-04 09:21:13 +00:00
import React from "react";
2020-11-10 14:29:11 +00:00
import PropTypes from "prop-types";
2020-11-04 09:21:13 +00:00
import styled from "styled-components";
2020-11-06 12:20:06 +00:00
import RectangleLoader from "../RectangleLoader/index";
2020-11-04 09:21:13 +00:00
2020-11-05 08:15:15 +00:00
const StyledContainer = styled.div`
2020-11-10 14:29:11 +00:00
padding-top: 13px;
padding-bottom: 10px;
2020-11-04 09:21:13 +00:00
`;
2020-11-10 14:29:11 +00:00
const ArticleHeaderLoader = ({ id, className, style, ...rest }) => {
const {
title,
x,
y,
width,
height,
borderRadius,
backgroundColor,
foregroundColor,
backgroundOpacity,
foregroundOpacity,
speed,
animate,
} = rest;
2020-11-04 09:21:13 +00:00
return (
2020-11-10 14:29:11 +00:00
<StyledContainer id={id} className={className} style={style}>
<RectangleLoader
title={title}
x={x}
y={y}
width={width}
height={height}
borderRadius={borderRadius}
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
2020-11-05 08:15:15 +00:00
</StyledContainer>
2020-11-04 09:21:13 +00:00
);
};
2020-11-10 14:29:11 +00:00
ArticleHeaderLoader.propTypes = {
id: PropTypes.string,
className: PropTypes.string,
style: PropTypes.object,
};
ArticleHeaderLoader.defaultProps = {
id: undefined,
className: undefined,
style: undefined,
};
2020-11-05 08:15:15 +00:00
export default ArticleHeaderLoader;