Skip to content

Commit 158df52

Browse files
ha-kukuyeongipark
andauthored
[1단계 - 페이먼츠] - 하쿠(이동현) 미션 제출합니다. (#432)
* docs: 기능 명세 작성 Co-authored-by: yeongipark <[email protected]> * chore: styled component 설치 Co-authored-by: yeongipark <[email protected]> * feat: Input 컴포넌트 구현 Co-authored-by: yeongipark <[email protected]> * style: input 스타일 변경 * feat: CardNumberInputs 구현 * feat: input width 동적으로 조정 Co-authored-by: yeongipark <[email protected]> * feat:CardExpirationPeriodInputs 구현 Co-authored-by: yeongipark <[email protected]> * feat:CardCVCNumberInputs구현 Co-authored-by: yeongipark <[email protected]> * feat: SectionTitle 구현 Co-authored-by: yeongipark <[email protected]> * feat:CardNumberSection구현 Co-authored-by: yeongipark <[email protected]> * feat:CardExpirationPeriodSection 구현 Co-authored-by: yeongipark <[email protected]> * feat:CardCVCNumberSection 구현 Co-authored-by: yeongipark <[email protected]> * feat:CardPreview UI 구현 Co-authored-by: yeongipark <[email protected]> * feat: inputProps type 삭제 Co-authored-by: yeongipark <[email protected]> * feat: 카드번호 동적 Ui로 표현 Co-authored-by: yeongipark <[email protected]> * feat: cardNumberInput 유효성 검사 추가 Co-authored-by: yeongipark <[email protected]> * feat: cardExpirationPeriodInput 유효성 검사 추가 Co-authored-by: yeongipark <[email protected]> * feat: cardExpirationPeriodInput UI 동적 표현 Co-authored-by: yeongipark <[email protected]> * feat: cardCVCNumberInput UI 동적 표현 Co-authored-by: yeongipark <[email protected]> * feat: cardPreview UI 동적 표현 Co-authored-by: yeongipark <[email protected]> * fix: storybook 에러 수정 Co-authored-by: yeongipark <[email protected]> * fix: 경로 오류 수정 Co-authored-by: yeongipark <[email protected]> * style: styled component 변수명 변경 Co-authored-by: yeongipark <[email protected]> * refactor: app UI 중앙 정렬 Co-authored-by: yeongipark <[email protected]> * refactor: 공통 type 분리 Co-authored-by: yeongipark <[email protected]> * refactor: 상수화 Co-authored-by: yeongipark <[email protected]> * refactor: 공통 로직 분리 Co-authored-by: yeongipark <[email protected]> * style: 코드 스타일 변경 Co-authored-by: yeongipark <[email protected]> * chore: chromatic workflow 추가 * docs: 기능 사항 체크 * feat: 페이지 배포 * docs: 리팩터링 사항 추가 * refactor: 카드 로고 동적 UI 구현 방식 변경 * refactor: validation 조건 수정 * style: types 폴더명 앞 공백 제거 * fix: 문자 입력 시 오류메시지 미로딩 오류 해결 * refactor: 에러 처리 방식 변경 * refactor: input 중복 코드 줄이기 * style: 코드 포멧터 적용 * docs: 리팩터리 반영사항 체크 --------- Co-authored-by: yeongipark <[email protected]>
1 parent 24604b7 commit 158df52

30 files changed

+1160
-26
lines changed

.github/workflows/chromatic.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
# Workflow name
3+
name: 'Chromatic Deployment'
4+
5+
# Event for the workflow
6+
on: push
7+
8+
# List of jobs
9+
jobs:
10+
chromatic:
11+
name: 'Run Chromatic'
12+
runs-on: ubuntu-latest
13+
# Job steps
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
- run: yarn
19+
#👇 Adds Chromatic as a step in the workflow
20+
- uses: chromaui/action@latest
21+
# Options required for Chromatic's GitHub Action
22+
with:
23+
#👇 Chromatic projectToken, see https://storybook.js.org/tutorials/intro-to-storybook/react/ko/deploy/ to obtain it
24+
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
25+
token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,6 @@ dist-ssr
2626
*.sln
2727
*.sw?
2828

29-
*storybook.log
29+
*storybook.log
30+
31+
# json

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,32 @@
11
# react-payments
2+
3+
### 카드 번호 입력 및 식별
4+
5+
- [x] 사용자가 입력하는 카드 번호를 실시간으로 파악
6+
- [x] Visa나 MasterCard에 해당하면 해당 브랜드의 로고를 UI에 표시한다.
7+
- [x] 숫자에 대한 유효성 검사 진행
8+
- [x] 입력은 숫자만 가능
9+
- [x] 유효하지 않은 경우 피드백 제공
10+
11+
### 카드 유효기간 입력
12+
13+
- [x] 연월을 입력한다.
14+
- [x] 연월에 대한 유효성 검사
15+
- [x] 범위 내에서만 입력 가능
16+
- [x] 숫자만 입력 가능
17+
18+
### 실시간 프리뷰 업데이트
19+
20+
- [x] 한 input의 값이 채워지고 유효성 검사가 통과 되면 카드 프리뷰에 노출시킨다.
21+
- [x] 고유 식별 번호에 따라서 카드 로고가 변경된다.
22+
- [x] Visa: 4로 시작하는 16자리 숫자
23+
- [x] MasterCard: 51~55로 시작하는 16자리 숫자
24+
25+
### 리팩터링 사항
26+
27+
- [x] 카드 로고 동적 UI 구현 방법 바꾸기
28+
- [x] 코드 포맷터 적용
29+
- [x] isValidNumber 수정
30+
- [x] 중복 코드 줄이기
31+
- [x] types 폴더명 앞 공백 수정
32+
- [x] 에러 처리 로직 수정

0 commit comments

Comments
 (0)