Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 플렉스 박스 align-items가 동작하지 않는 에러를 개선한다 #237

Merged
merged 1 commit into from
Jul 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions frontend/src/components/common/FlexBox/FlexBox.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ const meta = {
'플렉스 컨테이너 안에 있는 아이템의 위치를 조절할 수 있습니다.<br>- direction이 row일 경우: 수평을 기준으로 아이템이 이동합니다.<br>- direction이 column일 경우: 수직을 기준으로 아이템이 이동합니다.',
},
alignContent: {
options: Object.keys({ ...FLEX_BOX_ITEM_POSITION, none: undefined }),
control: {
type: 'select',
},
description:
'플렉스 컨테이너 안에 있는 아이템의 위치를 조절할 수 있습니다.<br>- direction이 row일 경우: 수직을 기준으로 아이템이 이동합니다.<br>- direction이 column일 경우: 수평을 기준으로 아이템이 이동합니다.<br> ❗`wrap`(noWrap이 false)일 때만 사용 가능합니다.',
},
alignItems: {
options: Object.keys({ ...FLEX_BOX_ITEM_POSITION, none: undefined }),
control: {
type: 'select',
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/common/FlexBox/FlexBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ const S = {
height: ${({ height }) => getSize(height)};
flex-wrap: ${({ nowrap }) => (nowrap ? 'nowrap' : 'wrap')};
flex-direction: ${({ direction }) => (direction ? direction : 'row')};
justify-content: ${({ justifyContent }) => FLEX_BOX_ITEM_POSITION[justifyContent] || 'start'};
align-items: ${({ alignItems }) => FLEX_BOX_ITEM_POSITION[alignItems] || 'start'};
align-content: ${({ alignContent }) => FLEX_BOX_ITEM_POSITION[alignContent] || 'start'};
justify-content: ${({ justifyContent }) => FLEX_BOX_ITEM_POSITION[justifyContent]};
align-items: ${({ alignItems }) => FLEX_BOX_ITEM_POSITION[alignItems]};
align-content: ${({ alignContent }) => FLEX_BOX_ITEM_POSITION[alignContent]};
gap: ${({ gap, rowGap, columnGap }) => getGap({ gap, rowGap, columnGap })};
background: ${({ background }) => background || '#fff'};
border: ${({ outlined }) => (outlined ? '0.15rem solid #000' : 'none')};
Expand Down
Loading