-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat(xdesign-story): button component 추가 #62
base: new-design-system
Are you sure you want to change the base?
Conversation
import styled from '@emotion/styled'; | ||
import { ButtonVarientType, ButtonKindType, ButtonProps } from './Button.types'; | ||
|
||
export const Button = ({ varient, kind, icon, children, ...props }: ButtonProps) => { |
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.
button에 forwardRef 감싸서 ref를 받을수 있으면 좋을 것 같아
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.
수정은 했습니다만 제가 맞게 한 건지 확신이 안들어서 그러는데 재확인 부탁드려도 될까요?
const kindVarient = (kind: ChipKindType) => { | ||
switch (kind) { | ||
case 'filled': | ||
return css` | ||
color: ${lightTheme.OnSecondary}; | ||
background: ${lightTheme.Secondary}; | ||
`; | ||
case 'outlined': | ||
return css` | ||
color: ${lightTheme.Secondary}; | ||
background-color: ${lightTheme.OnSecondary}; | ||
border: 1px solid ${lightTheme.Secondary}; | ||
&:active { | ||
color: ${lightTheme.Secondary}; | ||
background-color: ${lightTheme.SecondaryContainer}; | ||
} | ||
`; | ||
} | ||
}; | ||
|
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.
lightTheme의 컬러를 가져오는 것 같은데 나중에 다크모드를 추가하면 문제가 되지 않을까?
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.
@jikwan0327 다크모드 상태일때도 라이트 모드의 색깔이 나오지 않을까 해서요?
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.
다크모드 추가하여 확장가능하도록 변경하여 올렸습니다
개요
좋습니다.
작업사항
참조