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-입력컴포넌트를 생성한다. #25

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Jackihyun
Copy link

📌 PR Summary

입력 컴포넌트와 입력컴포넌트가 들어간 레이블 컴포넌트를 만들었습니다. 입력 레이블 구현할 때 사용 + 다방면으로 사용가능.

스크린샷 2025-01-05 오전 2 08 17

🤔 NOTE

스토리북도 만들었습니다. components의 Input폴더만 확인 해주시면 됩니다.

🔗 Related Issues

x

@Jackihyun Jackihyun linked an issue Jan 4, 2025 that may be closed by this pull request
Copy link

netlify bot commented Jan 4, 2025

Deploy Preview for strong-cupcake-4268bc ready!

Name Link
🔨 Latest commit 3233d65
🔍 Latest deploy log https://app.netlify.com/sites/strong-cupcake-4268bc/deploys/677ba1fdb9e8f40008ff1520
😎 Deploy Preview https://deploy-preview-25--strong-cupcake-4268bc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@jeheecheon jeheecheon left a comment

Choose a reason for hiding this comment

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

굿굿~
주석은 지워줘도 될 것 같어!
그리고 Input도 시간날 때 따로 Atom/Input 으로 스토리 만들어두면 좋을 듯!
나중에 Form이 다른 형태로 쓰일 수도 있으니!

...props
}) => {
return (
<div className={cn(`(LabelInputVariant) w-full`, className)} {...props}>
Copy link
Member

Choose a reason for hiding this comment

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

요기 (LabelInputVariant) 깜빡하구 못 지운듯?!

Copy link
Author

Choose a reason for hiding this comment

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

맞아여,,


const LabelInputVariant = cva('w-full text-left', {
variants: {
variants: {
Copy link
Member

Choose a reason for hiding this comment

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

별 거 아니긴 한데 요기 단수로 네이밍하는 게 좋을 것 같음!

Copy link
Author

Choose a reason for hiding this comment

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

variant? 말씀하시는 거져??

Copy link
Member

Choose a reason for hiding this comment

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

ㅇㅇㅇ맞으 위에 Input은 variant 이길래 살짝 일관되게 해주면 좋을 것 같아서👍

Copy link
Author

Choose a reason for hiding this comment

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

variants: {
primary: 'mb-1.5 font-normal text-gray-1',
},
labelsize: {
Copy link
Member

Choose a reason for hiding this comment

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

여기는 camelCase 깜빡한듯

@@ -25,5 +25,4 @@ const RootLayout: React.FC<RootLayoutProps> = ({ children }) => {
</html>
);
};

Copy link
Member

Choose a reason for hiding this comment

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

여기 공백은 실수??로 지운거지??ㅋㅋ

Copy link
Author

Choose a reason for hiding this comment

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

아...그런거 같아여...

@jeheecheon jeheecheon assigned Jackihyun and unassigned jeheecheon Jan 5, 2025
type: 'text',
placeholder: 'Input with error',
error: 'This field is required',
className: 'border-red-500', // 에러 시 빨간 테두리
Copy link
Member

Choose a reason for hiding this comment

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

어차피 나중에 디자인 싹 ㅂ바뀔거라서 상관없긴 한데 바깥에서 Input 컴포넌트 사용할 때에는 스타일 색상 관련해서 className보다는 props으로만 하는 게 좋음

Comment on lines +48 to +55
<label className={cn(LabelInputVariant({ labelSize }))}>{label}</label>
<Input
type={type}
size={size}
rounded={rounded}
error={error}
placeholder={placeholder}
/>
Copy link
Member

Choose a reason for hiding this comment

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

놓치고 확인을 못 했는데 htmlFor 로 Input 태그랑 연결해주느 게 좋음. 이때는 useId 써도 좋을듯

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.

FEAT-입력컴포넌트를 생성한다.
2 participants