-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Feature/BAR-158] Dialog 컴포넌트 개발 #39
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼 고생하셨습니다 !
src/components/Icon/index.tsx
Outdated
@@ -2,15 +2,29 @@ import { iconFactory, type Icons } from '../../constants/icon'; | |||
|
|||
interface IconProps { | |||
icon: Icons; | |||
className?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요게 필요할까요 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 동의해요! 아이콘(SVG)에 직접 스타일링 하는 대신 태그를 감싸서 스타일링 하는 건 어떤가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wonjin-dev @dmswl98
해당 부분 div 태그로 감싸서 스타일링하는 방식으로 수정하였습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니당!!
근데 이거 Dialog가 아니라 Dropdown 컴포넌트 아닌가요? 🤔
src/components/Dialog/index.tsx
Outdated
interface DialogContextProps { | ||
type?: 'small' | 'medium'; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dmswl98
그렇겟네요!!! 필수 타입으로 변경하였습니다!
(recipe에서 제공하는 헬퍼 fucntion을 사용하면서 undefined
제거하기가 쉽지 않네요...)
src/components/Dialog/index.tsx
Outdated
type DialogRootProps = RecipeVariants<typeof styles.dialogRoot> & | ||
PropsWithChildren<unknown>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unknown
을 사용하신 이유가 궁금해요! 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dmswl98
아 요거 default가 unknown
이었네요 ㅎㅎ... 빼서 반영하겠습니다!
src/components/Icon/index.tsx
Outdated
@@ -2,15 +2,29 @@ import { iconFactory, type Icons } from '../../constants/icon'; | |||
|
|||
interface IconProps { | |||
icon: Icons; | |||
className?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 동의해요! 아이콘(SVG)에 직접 스타일링 하는 대신 태그를 감싸서 스타일링 하는 건 어떤가요?
src/constants/icon.ts
Outdated
export const iconFactory = { | ||
add: Add, | ||
close: Close, | ||
logout: Logout, | ||
profile: Profle, | ||
profileDialog: ProfileDialog, | ||
setting: Setting, | ||
submit: Submit, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
알파벳순 정렬 굿 👍🏻👍🏻👍🏻
5ffef49
to
222b1f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다!!!
src/components/Dialog/index.tsx
Outdated
interface DialogContextProps { | ||
type: 'small' | 'medium'; | ||
} | ||
|
||
interface DialogRootProps extends PropsWithChildren { | ||
type: 'small' | 'medium'; | ||
} | ||
|
||
export const DialogContext = createContext<DialogContextProps | null>(null); | ||
|
||
const DialogRoot = ({ children, type }: DialogRootProps) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interface DialogContextProps { | |
type: 'small' | 'medium'; | |
} | |
interface DialogRootProps extends PropsWithChildren { | |
type: 'small' | 'medium'; | |
} | |
export const DialogContext = createContext<DialogContextProps | null>(null); | |
const DialogRoot = ({ children, type }: DialogRootProps) => { | |
interface DialogContextProps { | |
type: 'small' | 'medium'; | |
} | |
interface DialogRootProps extends DialogContextProps {} | |
export const DialogContext = createContext<DialogContextProps | null>(null); | |
const DialogRoot = ({ children, type }: PropsWithChildren<DialogRootProps>) => { |
이렇게 작성해볼 수 있을 것 같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3e3ec86
감사합니다! 여기에서 반영해보았습니다 ㅎㅎ
Summary
How To Test
Dialog 컴포넌트 정상 노출 확인