Commit dc40a3bf authored by 박민석's avatar 박민석

update section display(grid)

parent 7d8ed5f3
...@@ -11,7 +11,7 @@ function App () { ...@@ -11,7 +11,7 @@ function App () {
<> <>
<Header /> <Header />
<Banner /> <Banner />
<Section title='Products' gap='3rem'> <Section title='Products' gap='3rem' display='grid'>
<Card <Card
title='BXM' title='BXM'
subTitle='Business eXcellence Framework' subTitle='Business eXcellence Framework'
......
...@@ -34,9 +34,10 @@ export default function Card (props) { ...@@ -34,9 +34,10 @@ export default function Card (props) {
const Scene = styled.div` const Scene = styled.div`
position: 'relative'; position: 'relative';
width: 400px; /* width: 400px; */
height: 460px; width: 100%;
margin: 40px 0; height: 450px;
margin-top: 40px;
perspective: 1200px; perspective: 1200px;
` `
const FlipCard = styled.article` const FlipCard = styled.article`
...@@ -48,7 +49,7 @@ const FlipCard = styled.article` ...@@ -48,7 +49,7 @@ const FlipCard = styled.article`
position: relative; position: relative;
${Scene}:hover & { ${Scene}:hover & {
transform: scale(1.1) rotateY(180deg); transform: rotateY(180deg);
} }
` `
const CardFace = styled.article` const CardFace = styled.article`
......
...@@ -2,30 +2,39 @@ ...@@ -2,30 +2,39 @@
import styled from 'styled-components' import styled from 'styled-components'
export default function Section (props) { export default function Section (props) {
const { gap, title } = props const { gap, title, display = 'flex' } = props
return <Wrapper> return <Wrapper>
<Title>{title}</Title> <Title>{title}</Title>
<Contents gap={gap}> {
display === 'flex'
? <FlexContents gap={gap}>
{props.children} {props.children}
</Contents> </FlexContents>
: <GridContents gap={gap}>
{props.children}
</GridContents>
}
</Wrapper> </Wrapper>
} }
const Wrapper = styled.section` const Wrapper = styled.section`
display: flex; padding: 80px;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 80px 0;
` `
const Title = styled.h1` const Title = styled.h1`
font-size: 4rem; text-align: center;
font-size: 3rem;
font-weight: 700; font-weight: 700;
` `
const Contents = styled.div` const FlexContents = styled.div`
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
gap: ${props => props.gap}; gap: ${props => props.gap};
flex-wrap: wrap;
`
const GridContents = styled.div`
display: grid;
grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
gap: ${props => props.gap};
` `
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment