index.tsx 777 B

1234567891011121314151617181920212223242526272829303132
  1. import React from "react";
  2. import styled from "styled-components";
  3. interface ContainerProps {
  4. reverse?: boolean;
  5. }
  6. const StyledContainer = styled.div<{ reverse: boolean }>`
  7. display: flex;
  8. justify-content: space-between;
  9. gap: 50px;
  10. align-items: center;
  11. width: 75%;
  12. margin: 0 auto 160px;
  13. min-height: calc(100vh - 250px);
  14. flex-direction: ${({ reverse }) => reverse && "row-reverse"};
  15. line-height: 1.2;
  16. @media only screen and (max-width: 768px) {
  17. width: 100%;
  18. flex-direction: column;
  19. margin-bottom: 50px;
  20. justify-content: center;
  21. }
  22. `;
  23. export const Container: React.FC<ContainerProps> = ({
  24. children,
  25. reverse = false,
  26. }) => {
  27. return <StyledContainer reverse={reverse}>{children}</StyledContainer>;
  28. };