-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d23ea0
commit 9e11d70
Showing
3 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { style, styleVariants } from '@vanilla-extract/css'; | ||
import { MEDIA_QUERY } from '@/constants/styles'; | ||
|
||
const wrapperBase = style({ | ||
display: 'flex', | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
width: '100%', | ||
maxWidth: '1280px', | ||
height: '100vh', | ||
padding: '0 51px', | ||
gap: '128px', | ||
|
||
[`@media ${MEDIA_QUERY.tabletLg}`]: { | ||
padding: '0 24px', | ||
gap: '53px', | ||
}, | ||
[`@media ${MEDIA_QUERY.tabletSm}`]: { | ||
flexDirection: 'column', | ||
padding: '0', | ||
gap: '150px', | ||
}, | ||
[`@media ${MEDIA_QUERY.mobile}`]: { | ||
flexDirection: 'column', | ||
padding: '0', | ||
gap: '88px', | ||
}, | ||
}); | ||
|
||
const wrapperReverse = style({ | ||
flexDirection: 'row-reverse', | ||
|
||
[`@media ${MEDIA_QUERY.tabletSm}`]: { | ||
flexDirection: 'column', | ||
}, | ||
[`@media ${MEDIA_QUERY.mobile}`]: { | ||
flexDirection: 'column', | ||
}, | ||
}); | ||
|
||
export const wrapper = styleVariants({ | ||
default: [wrapperBase], | ||
reverse: [wrapperBase, wrapperReverse], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import * as styles from './MainSection.css'; | ||
|
||
interface MainSectionProps { | ||
children: React.ReactNode; | ||
reverse?: boolean; | ||
} | ||
|
||
const MainSection = ({ children, reverse }: MainSectionProps) => { | ||
const direction = reverse ? 'reverse' : 'default'; | ||
return <div className={styles.wrapper[direction]}>{children}</div>; | ||
}; | ||
|
||
export default MainSection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import MainSection from './MainSection'; | ||
|
||
export default MainSection; |