-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #885 from woowacourse-teams/develop
[release] v1.1.5
- Loading branch information
Showing
50 changed files
with
371 additions
and
200 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
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 |
---|---|---|
@@ -1,14 +1,21 @@ | ||
import { SerializedStyles } from '@emotion/react'; | ||
|
||
interface Colors { | ||
interface ColorsType { | ||
[key: string]: string; | ||
} | ||
|
||
type Flex = Record<'row' | 'column', SerializedStyles>; | ||
type FlexType = Record<'row' | 'column', SerializedStyles>; | ||
|
||
interface MQType { | ||
laptop: string; | ||
tablet: string; | ||
mobile: string; | ||
} | ||
|
||
declare module '@emotion/react' { | ||
export interface Theme { | ||
colors: Colors; | ||
flex: Flex; | ||
colors: ColorsType; | ||
flex: FlexType; | ||
mq?: MQType; | ||
} | ||
} |
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
11 changes: 7 additions & 4 deletions
11
frontend/src/components/@common/PageLayout/PageLayout.styles.ts
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 |
---|---|---|
@@ -1,14 +1,17 @@ | ||
import { css } from '@emotion/react'; | ||
import { css, Theme } from '@emotion/react'; | ||
|
||
const pageLayout = (isSideBarOpen: boolean) => css` | ||
const pageLayout = ({ mq }: Theme, isSideBarOpen: boolean) => css` | ||
overflow-y: auto; | ||
position: relative; | ||
height: calc(100vh - 16rem); | ||
margin-top: 16rem; | ||
margin-left: ${isSideBarOpen ? '64rem' : '0'}; | ||
transition: margin-left 0.3s; | ||
${mq?.laptop} { | ||
margin-left: ${isSideBarOpen ? '64rem' : '0'}; | ||
transition: margin-left 0.3s; | ||
} | ||
`; | ||
|
||
export { pageLayout }; |
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
26 changes: 26 additions & 0 deletions
26
frontend/src/components/@common/Responsive/Responsive.styles.ts
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,26 @@ | ||
import { css, Theme } from '@emotion/react'; | ||
|
||
const layoutStyle = ({ mq }: Theme, type: string) => css` | ||
display: none; | ||
width: 100%; | ||
height: 100%; | ||
${type === 'laptop' && mq?.laptop} { | ||
display: block; | ||
} | ||
${type === 'tablet' && mq?.tablet} { | ||
display: block; | ||
} | ||
${type === 'mobile' && mq?.mobile} { | ||
display: block; | ||
} | ||
${type === 'all'} { | ||
display: block; | ||
} | ||
`; | ||
|
||
export { layoutStyle }; |
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,16 @@ | ||
import { useTheme } from '@emotion/react'; | ||
|
||
import { layoutStyle } from './Responsive.styles'; | ||
|
||
interface ResponsiveProps { | ||
type: string; | ||
children: JSX.Element | JSX.Element[]; | ||
} | ||
|
||
function Responsive({ type = 'all', children }: ResponsiveProps) { | ||
const theme = useTheme(); | ||
|
||
return <div css={layoutStyle(theme, type)}>{children}</div>; | ||
} | ||
|
||
export default Responsive; |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.