-
Notifications
You must be signed in to change notification settings - Fork 1
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
0603775
commit 0a6d8cb
Showing
37 changed files
with
317 additions
and
141 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { css } from '@emotion/react'; | ||
|
||
import { Theme } from '@/styles/Theme'; | ||
|
||
export const getContainerStyling = { | ||
container: css` | ||
padding: 16px; | ||
margin-left: 28px; | ||
border-radius: ${Theme.borderRadius.medium}; | ||
background-color: ${Theme.color.white}; | ||
box-shadow: ${Theme.container.shadows.md}; | ||
overflow: hidden; | ||
`, | ||
whiteContainer: css` | ||
padding: 12px; | ||
margin-bottom: 16px; | ||
border-radius: ${Theme.borderRadius.medium}; | ||
background-color: ${Theme.color.white}; | ||
box-shadow: ${Theme.container.shadows.md}; | ||
`, | ||
}; | ||
|
||
export const getWidthStyling = ( | ||
widthKey: keyof typeof Theme.container.width, | ||
) => css` | ||
${Theme.container.width[widthKey]} | ||
`; | ||
|
||
export const getHeightStyling = ( | ||
heightKey?: keyof typeof Theme.container.height, | ||
) => (heightKey ? css`${Theme.container.height[heightKey]}` : ''); |
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,55 @@ | ||
import { css } from '@emotion/react'; | ||
import { Theme } from '@/styles/Theme'; | ||
|
||
import { | ||
getContainerStyling, | ||
getWidthStyling, | ||
getHeightStyling, | ||
} from './Container.styled'; | ||
|
||
export interface ContainerProps { | ||
/** | ||
* 컨테이너의 너비를 설정합니다. | ||
*/ | ||
$width: keyof typeof Theme.container.width; | ||
|
||
/** | ||
* 컨테이너의 높이를 설정합니다. | ||
*/ | ||
$height?: keyof typeof Theme.container.height; | ||
|
||
/** | ||
* 컨테이너의 스타일 변형(variant)을 지정합니다. | ||
* @default: 'default' | ||
*/ | ||
$variant?: 'default' | 'white'; | ||
|
||
children?: React.ReactNode; | ||
} | ||
|
||
function Container({ | ||
$width, | ||
$height, | ||
$variant: variant = 'default', | ||
children, | ||
...attributes | ||
}: ContainerProps) { | ||
return ( | ||
<div | ||
css={css` | ||
${ | ||
variant === 'white' | ||
? getContainerStyling.whiteContainer | ||
: getContainerStyling.container | ||
}; | ||
${getWidthStyling($width)}; | ||
${$height ? getHeightStyling($height) : ''}; | ||
`} | ||
{...attributes} | ||
> | ||
{children} | ||
</div> | ||
); | ||
} | ||
|
||
export default Container; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { Container } from '@/components/Common/Container'; | ||
import { PrevContainer } from '@/components/Common/PrevContainer'; | ||
|
||
type GroupCalendarProps = { | ||
groupId?: number; | ||
}; | ||
|
||
function GroupCalendar({ groupId }: GroupCalendarProps) { | ||
console.log(groupId); | ||
return <Container $width="right">GroupCalendar</Container>; | ||
return <PrevContainer $width="right">GroupCalendar</PrevContainer>; | ||
} | ||
|
||
export default GroupCalendar; |
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.