Skip to content

Conversation

@yongb2n
Copy link
Contributor

@yongb2n yongb2n commented Nov 15, 2024

📌 PR 템플릿

🏷️ PR 타입 (PR Type)

아래 해당 사항에 체크해 주세요.

  • 🐛 버그 수정 (Bugfix)
  • ✨ 기능 개발 (Feature)
  • 🎨 코드 스타일 변경 (Code style update) - 포매팅, 로컬 변수 등
  • ♻️ 리팩토링 (Refactoring) - 기능 변화 없음, API 변경 없음
  • 🛠️ 빌드 관련 변경 (Build related changes)
  • 📝 문서 내용 변경 (Documentation)
  • 🔄 기타 (Other) - 설명 작성

📝 요약 (Summary)

PR의 목적과 간단한 설명을 적어주세요.
RadioInput 컴포넌트 구현


🔍 상세 내용 (Describe your changes)

변경 사항을 구체적으로 작성해 주세요.

  • RadioInput 구현 (스토리북 코드 작성은 어려움이 있어 생략 -> 추후에 추가 예정)

🔗 관련 이슈 또는 링크 (Issue Number or Link)

이슈 번호나 관련 링크가 있다면 추가해 주세요.
#44


✅ 체크리스트 (Checklist)

PR 작성 시 아래 사항들을 점검해 주세요.

  • 빌드가 성공적으로 되었나요?
  • 코드에 주석을 추가했나요?
  • 모든 테스트가 통과했나요?
  • 관련 문서가 업데이트되었나요?

📸 스크린샷 (선택 사항)

변경 사항이 UI와

스크린샷 2024-11-15 오후 6 11 29 관련이 있다면 스크린샷을 추가해 주세요.

📝 기타 사항

PR과 관련된 기타 사항이 있다면 적어주세요.

./src/components/common/input/RadioInput.tsx
24:36  Warning: Replace `ml-4·h-22·font-normal·leading-body2` with `leading-body2·ml-4·h-22·font-normal`  prettier/prettier

빌드 시 이런 경고가 나오는데, 테일윈드 확장 (CSS InteliSense) 프로그램에서 자동으로 정리해주는 것과 맞지 않아서 나오는 것 같습니다.

@yongb2n yongb2n self-assigned this Nov 15, 2024
@yongb2n yongb2n linked an issue Nov 15, 2024 that may be closed by this pull request
2 tasks
Copy link
Contributor

@KingNono1030 KingNono1030 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 ㅎㅎ
제가 예상한대로 깔끔하게 코드 작성해주셔서 인상 깊었어요

Comment on lines 16 to 20
className={clsx(
'flex cursor-pointer items-center',
disabled && 'cursor-not-allowed opacity-50',
className
)}
Copy link
Contributor

Choose a reason for hiding this comment

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

clsx 같은 경우에는,

const labelClass = clsx(
        'flex cursor-pointer items-center',
        disabled && 'cursor-not-allowed opacity-50',
        className
      )
      
      className={labelClass}

이런 식으로 return 부는 가능한 깔끔하게 남기면 좋을거 같아요 !

)}
>
<input type='radio' checked={checked} disabled={disabled} {...props} />
<span className='custom-radio'></span>
Copy link
Contributor

Choose a reason for hiding this comment

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

지금 이 cusom-raio 가 라디오 버튼을 대신해주고 있으니, aria 태그는 이 친구에게
aria-label={'radio button'} 주면 좋을거 같아요

Copy link
Contributor

Choose a reason for hiding this comment

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

<span role="radio" tabindex="0" aria-checked={checked}></span>

추가로 줄 만한 속성이 role, tabindex, aira-checked 정도 있을 것 같아요

Copy link
Contributor

Choose a reason for hiding this comment

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

https://juhyejin.tistory.com/54

원래 input 의 display 를 none 으로 하면서, 접근성 면에서 손해를 보는 현상이 있는거 같아요. 해당 아티클 참고하면 좋을거 같습니다 !

Copy link
Contributor

@yellowjang yellowjang left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!!

@yongb2n yongb2n merged commit 178306d into dev Nov 17, 2024
1 check passed
@yongb2n yongb2n deleted the feat/common-component-radio-input branch November 17, 2024 08:21
@yongb2n yongb2n changed the title [#44] ✨ RadioInput 컴포넌트 구현 [#44] ✨ 공통 컴포넌트 RadioInput 컴포넌트 구현 Nov 17, 2024
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.

[FEATURE] [공통 컴포넌트] Radio

4 participants