mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-27 15:22:56 +08:00
create container component
This commit is contained in:
parent
b349207d35
commit
aa01c07f25
21
src/components/Container/index.tsx
Normal file
21
src/components/Container/index.tsx
Normal file
@ -0,0 +1,21 @@
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
|
||||
interface ContainerProps {
|
||||
reverse?: boolean;
|
||||
}
|
||||
|
||||
const StyledContainer = styled.div<{ reverse: boolean }>`
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 50px;
|
||||
align-items: center;
|
||||
width: 75%;
|
||||
margin: 40px auto;
|
||||
flex-direction: ${({ reverse }) => reverse && 'row-reverse'};
|
||||
line-height: 1.2;
|
||||
`;
|
||||
|
||||
export const Container: React.FC<ContainerProps> = ({ children, reverse = false }) => {
|
||||
return <StyledContainer reverse={reverse}>{children}</StyledContainer>;
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user