2020-11-06 14:43:59 +00:00
|
|
|
import React from "react";
|
2020-11-10 14:29:11 +00:00
|
|
|
import PropTypes from "prop-types";
|
2020-11-10 14:54:38 +00:00
|
|
|
import { StyledHeader, StyledSpacer } from "./StyledHeaderLoader";
|
2021-02-25 21:19:45 +00:00
|
|
|
import RectangleLoader from "../RectangleLoader";
|
2020-11-11 23:25:34 +00:00
|
|
|
import CircleLoader from "../CircleLoader/index";
|
2020-11-06 14:43:59 +00:00
|
|
|
|
2020-11-10 14:29:11 +00:00
|
|
|
const HeaderLoader = ({ id, className, style, ...rest }) => {
|
|
|
|
const {
|
|
|
|
title,
|
|
|
|
borderRadius,
|
|
|
|
backgroundColor,
|
|
|
|
foregroundColor,
|
|
|
|
backgroundOpacity,
|
|
|
|
foregroundOpacity,
|
|
|
|
speed,
|
|
|
|
animate,
|
|
|
|
} = rest;
|
|
|
|
|
2020-11-06 14:43:59 +00:00
|
|
|
return (
|
2020-11-10 14:29:11 +00:00
|
|
|
<StyledHeader id={id} className={className} style={style}>
|
2020-11-06 14:43:59 +00:00
|
|
|
<RectangleLoader
|
2020-11-10 14:29:11 +00:00
|
|
|
title={title}
|
2020-11-06 14:43:59 +00:00
|
|
|
width="24"
|
|
|
|
height="24"
|
2020-11-10 14:29:11 +00:00
|
|
|
borderRadius={borderRadius}
|
|
|
|
backgroundColor={backgroundColor}
|
|
|
|
foregroundColor={foregroundColor}
|
|
|
|
backgroundOpacity={backgroundOpacity}
|
|
|
|
foregroundOpacity={foregroundOpacity}
|
|
|
|
speed={speed}
|
|
|
|
animate={animate}
|
2020-11-06 14:43:59 +00:00
|
|
|
/>
|
|
|
|
<RectangleLoader
|
2020-11-10 14:29:11 +00:00
|
|
|
title={title}
|
2020-11-06 14:43:59 +00:00
|
|
|
width="168"
|
|
|
|
height="24"
|
2020-11-10 14:29:11 +00:00
|
|
|
borderRadius={borderRadius}
|
|
|
|
backgroundColor={backgroundColor}
|
|
|
|
foregroundColor={foregroundColor}
|
|
|
|
backgroundOpacity={backgroundOpacity}
|
|
|
|
foregroundOpacity={foregroundOpacity}
|
|
|
|
speed={speed}
|
|
|
|
animate={animate}
|
2020-11-06 14:43:59 +00:00
|
|
|
/>
|
|
|
|
<StyledSpacer />
|
2020-11-11 23:25:34 +00:00
|
|
|
<CircleLoader
|
|
|
|
x="18"
|
|
|
|
y="18"
|
|
|
|
radius="18"
|
|
|
|
width="36"
|
|
|
|
height="36"
|
|
|
|
backgroundColor="#fff"
|
|
|
|
foregroundColor="#fff"
|
|
|
|
backgroundOpacity={0.25}
|
|
|
|
foregroundOpacity={0.2}
|
|
|
|
/>
|
2020-11-06 14:43:59 +00:00
|
|
|
</StyledHeader>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2020-11-10 14:29:11 +00:00
|
|
|
HeaderLoader.propTypes = {
|
|
|
|
id: PropTypes.string,
|
|
|
|
className: PropTypes.string,
|
|
|
|
style: PropTypes.object,
|
|
|
|
};
|
|
|
|
|
|
|
|
HeaderLoader.defaultProps = {
|
|
|
|
id: undefined,
|
|
|
|
className: undefined,
|
|
|
|
style: undefined,
|
|
|
|
backgroundColor: "#fff",
|
|
|
|
foregroundColor: "#fff",
|
|
|
|
backgroundOpacity: 0.25,
|
|
|
|
foregroundOpacity: 0.2,
|
|
|
|
};
|
|
|
|
|
2020-11-06 14:43:59 +00:00
|
|
|
export default HeaderLoader;
|