2022-04-01 10:56:37 +00:00
|
|
|
import styled, { css } from "styled-components";
|
2022-02-03 15:34:19 +00:00
|
|
|
import RectangleLoader from "../RectangleLoader";
|
2022-04-01 10:56:37 +00:00
|
|
|
|
2022-05-30 12:24:57 +00:00
|
|
|
import { isMobile, isMobileOnly } from "react-device-detect";
|
2022-02-03 15:34:19 +00:00
|
|
|
import { tablet, mobile } from "@appserver/components/utils/device";
|
2021-09-27 12:59:37 +00:00
|
|
|
|
|
|
|
const StyledContainer = styled.div`
|
2021-09-30 09:05:04 +00:00
|
|
|
margin: 0;
|
2021-10-04 14:22:06 +00:00
|
|
|
|
|
|
|
max-width: 216px;
|
2021-09-27 12:59:37 +00:00
|
|
|
padding: 0 20px;
|
|
|
|
|
|
|
|
@media ${tablet} {
|
2022-02-03 15:34:19 +00:00
|
|
|
width: ${(props) => (props.showText ? "240px" : "52px")};
|
|
|
|
padding: ${(props) => (props.showText ? "0 16px" : "10px 16px")};
|
2022-05-12 12:53:22 +00:00
|
|
|
box-sizing: border-box;
|
2021-09-27 12:59:37 +00:00
|
|
|
}
|
|
|
|
|
2022-04-01 10:56:37 +00:00
|
|
|
${isMobile &&
|
|
|
|
css`
|
|
|
|
max-width: ${(props) => (props.showText ? "240px" : "52px")};
|
|
|
|
width: ${(props) => (props.showText ? "240px" : "52px")};
|
|
|
|
padding: ${(props) => (props.showText ? "0 16px" : "10px 16px")};
|
2022-05-12 12:53:22 +00:00
|
|
|
box-sizing: border-box;
|
2022-04-01 10:56:37 +00:00
|
|
|
`}
|
|
|
|
|
2021-09-27 12:59:37 +00:00
|
|
|
@media ${mobile} {
|
|
|
|
width: 100%;
|
|
|
|
padding: 0 16px;
|
2022-05-12 12:53:22 +00:00
|
|
|
box-sizing: border-box;
|
2021-09-27 12:59:37 +00:00
|
|
|
}
|
2022-05-30 12:24:57 +00:00
|
|
|
|
|
|
|
${isMobileOnly &&
|
|
|
|
css`
|
|
|
|
width: 100%;
|
|
|
|
padding: 0 16px;
|
|
|
|
box-sizing: border-box;
|
|
|
|
`}
|
2021-09-27 12:59:37 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
const StyledBlock = styled.div`
|
2021-09-30 09:05:04 +00:00
|
|
|
margin: 0;
|
2021-09-27 12:59:37 +00:00
|
|
|
width: 100%;
|
|
|
|
height: auto;
|
2021-10-04 14:22:06 +00:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2021-09-27 12:59:37 +00:00
|
|
|
margin-bottom: 20px;
|
|
|
|
|
|
|
|
@media ${tablet} {
|
|
|
|
margin-bottom: 24px;
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2021-09-30 09:05:04 +00:00
|
|
|
const StyledRectangleLoader = styled(RectangleLoader)`
|
|
|
|
height: 20px;
|
2022-03-15 14:41:37 +00:00
|
|
|
width: 216px;
|
2021-10-04 14:22:06 +00:00
|
|
|
padding: 0 0 16px;
|
2021-09-30 09:05:04 +00:00
|
|
|
|
|
|
|
@media ${tablet} {
|
2021-10-04 14:22:06 +00:00
|
|
|
height: 20px;
|
|
|
|
width: 20px;
|
|
|
|
padding: 0 0 24px;
|
2021-09-30 09:05:04 +00:00
|
|
|
}
|
2022-04-01 10:56:37 +00:00
|
|
|
|
|
|
|
${isMobile &&
|
|
|
|
css`
|
|
|
|
height: 20px;
|
|
|
|
width: 20px;
|
|
|
|
padding: 0 0 24px;
|
|
|
|
`}
|
2022-05-30 12:24:57 +00:00
|
|
|
|
|
|
|
@media ${mobile} {
|
|
|
|
width: 100%;
|
|
|
|
padding: 0 0 24px;
|
|
|
|
}
|
|
|
|
|
|
|
|
${isMobileOnly &&
|
|
|
|
css`
|
|
|
|
width: 100% !important;
|
|
|
|
padding: 0 0 24px !important;
|
|
|
|
`}
|
2021-09-30 09:05:04 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
export { StyledBlock, StyledContainer, StyledRectangleLoader };
|