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

feat(xdesign-story): button component 추가 #62

Open
wants to merge 4 commits into
base: new-design-system
Choose a base branch
from

Conversation

jikwan0327
Copy link
Contributor

개요

button component 추가

좋습니다.

작업사항

  • Button에 필요한 Icon 추가
  • Button 추가
  • Chip 추가
  • FloatingActionButton 추가

참조

import styled from '@emotion/styled';
import { ButtonVarientType, ButtonKindType, ButtonProps } from './Button.types';

export const Button = ({ varient, kind, icon, children, ...props }: ButtonProps) => {
Copy link
Member

Choose a reason for hiding this comment

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

button에 forwardRef 감싸서 ref를 받을수 있으면 좋을 것 같아

Copy link
Contributor Author

Choose a reason for hiding this comment

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

수정은 했습니다만 제가 맞게 한 건지 확신이 안들어서 그러는데 재확인 부탁드려도 될까요?

Comment on lines 29 to 48
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};
}
`;
}
};

Copy link
Member

Choose a reason for hiding this comment

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

lightTheme의 컬러를 가져오는 것 같은데 나중에 다크모드를 추가하면 문제가 되지 않을까?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

제가 잘 이해가 되지 않아서 그러는데 어떠한 부분에서 문제가 될 수 있는지 설명해 주실 수 있나요?

Copy link
Member

Choose a reason for hiding this comment

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

@jikwan0327 다크모드 상태일때도 라이트 모드의 색깔이 나오지 않을까 해서요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

다크모드 추가하여 확장가능하도록 변경하여 올렸습니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants