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

[FE] feat: Bottom Sheet Content 컴포넌트 추가 #48

Merged
merged 4 commits into from
Jul 18, 2023
Merged

Conversation

hae-on
Copy link
Collaborator

@hae-on hae-on commented Jul 17, 2023

Issue

✨ 구현한 기능

  • Bottom Sheet 내부에 들어갈 내용 컴포넌트를 추가하였습니다.
  • sortOptions를 상수화하였습니다. (일단 높은 가격순, 낮은 가격순만 추가)

📢 논의하고 싶은 내용

x

🎸 기타

x

Copy link
Collaborator

@Leejin-Yang Leejin-Yang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해온 수고했어요~🌞
코멘트 확인해주세요!

@@ -0,0 +1,64 @@
import { Button, Divider, theme } from '@fun-eat/design-system';
import { useState } from 'react';
import { styled } from 'styled-components';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { styled } from 'styled-components';
import styled from 'styled-components';

textColor={isSelected ? 'inherit' : theme.textColors.info}
variant="filled"
size="lg"
isSelected={isSelected}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요것도 타미와 같은 에러가 나나요.?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아마도 날듯..?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

어떤 에러죠?!?!

@@ -0,0 +1 @@
export const SORT_OPTIONS = ['높은 가격순', '낮은 가격순'] as const;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

api 명세에 맞게 상수를 작성해보면 어떨까요?
요청을 보낼 쿼리 값이 같이 있는 객체의 배열이면 좋을 것 같아요 😊

?sort=price,desc

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export const SORT_OPTIONS = [
  { label: '높은 가격순', value: 'price,desc' },
  { label: '낮은 가격순', value: 'price,asc' },
] as const;

위와 같이 수정하였습니다. value의 경우 추후 값 추가시 다시 생각해보도록 이야기 나눴습니다.

border: none;
outline: transparent;
font-weight: ${({ isSelected, theme }) => (isSelected ? theme.fontWeights.bold : 'inherit')};
cursor: pointer;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

button이면 cursor pointer 기본으로 되어있지 않나요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

button으로 바꾸고 지운다는걸 깜박했네용!

close: () => void;
}

const BottomSheetContent = ({ close }: BottomSheetContentProps) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BottomSheetContent는 정렬 옵션 리스트 뿐만 아니라 다른 정보를 나타낼 수 있는 범용적인 이름 같아요. 정렬 옵션 리스트에 맞는 이름은 어떤가요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋슴다. SortOptionList로 일단 수정했는데 더 좋은 이름 있으면 말씀 주세요~~

{option}
</SortOption>
</li>
{index < SORT_OPTIONS.length - 1 && <Divider variant="disabled" />}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

li의 border를 사용하는건 어떤가요?
ul 안에 li만 있는것이 맞아보여요.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 border-bottom으로 수정했습니다~~

Copy link
Collaborator

@xodms0309 xodms0309 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해온 수고하셨습니다~
황펭이 대부분 리뷰를 해주셔서 더 남길 코멘트는 없네용

textColor={isSelected ? 'inherit' : theme.textColors.info}
variant="filled"
size="lg"
isSelected={isSelected}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아마도 날듯..?

@hae-on
Copy link
Collaborator Author

hae-on commented Jul 18, 2023

SortButton가 해당 브랜치에서 분기하였기 때문에 본 수정사항은 feat/issue-34 브랜치에 바로 적용시켰습니다.

Copy link
Collaborator

@Leejin-Yang Leejin-Yang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌞

@hae-on hae-on merged commit 446dba1 into develop Jul 18, 2023
@hae-on hae-on deleted the feat/issue-32 branch July 18, 2023 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FE] 상품 리스트 페이지의 바텀시트 내부 컴포넌트 추가
3 participants