Skip to content

Commit 2d19a85

Browse files
authored
[3단계 - 페이먼츠] 유세지(김용래) 미션 제출합니다. (#159)
1 parent 4d1bdba commit 2d19a85

38 files changed

+683
-135
lines changed

.eslintrc.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
"browser": true,
44
"es2021": true
55
},
6-
"extends": ["eslint:recommended", "plugin:react/recommended"],
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:react/recommended",
9+
"plugin:@typescript-eslint/recommended"
10+
],
11+
"parser": "@typescript-eslint/parser",
712
"parserOptions": {
813
"ecmaFeatures": {
914
"jsx": true

jsconfig.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

package-lock.json

Lines changed: 332 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,17 @@
4444
"@storybook/preset-create-react-app": "^4.1.0",
4545
"@storybook/react": "^6.5.0-beta.1",
4646
"@storybook/testing-library": "^0.0.11",
47+
"@types/react": "^18.0.9",
48+
"@types/react-dom": "^18.0.5",
49+
"@types/styled-components": "^5.1.25",
50+
"@typescript-eslint/eslint-plugin": "^5.26.0",
51+
"@typescript-eslint/parser": "^5.26.0",
4752
"chromatic": "^6.5.4",
4853
"eslint": "^8.14.0",
4954
"eslint-plugin-react": "^7.29.4",
55+
"source-map-loader": "^3.0.1",
56+
"ts-loader": "^9.3.0",
57+
"typescript": "^4.7.2",
5058
"webpack": "^5.72.0"
5159
},
5260
"eslintConfig": {

src/components/cardRegister/CVCInput.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from "react";
1+
import React from "react";
22

33
import { RULE_INPUT } from "constants/constants";
44
import {

src/components/cardRegister/CardExpireDateInput.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect, useState } from "react";
1+
import React, { useEffect } from "react";
22

33
import { currentDate } from "utils/currentDate";
44
import { RULE_INPUT } from "constants/constants";

src/components/cardRegister/CardNumbersInput.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect, useRef, useState } from "react";
1+
import React, { useEffect, useRef } from "react";
22

33
import { RULE_INPUT } from "constants/constants";
44
import {

src/components/cardRegister/CardPasswordInput.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useRef, useState } from "react";
1+
import React, { useRef } from "react";
22

33
import { RULE_INPUT } from "constants/constants";
44
import {

src/components/cardRegister/CardSelectModal.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import styled from "styled-components";
33

44
export const CardSelectModal = ({
55
cardTypes,
6-
isValid,
76
handleVisible,
87
handleCardType,
98
handleCardTypeCheck,
Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
import React from "react";
22
import styled from "styled-components";
3+
import { COLORS } from "constants/color";
4+
import { textAlign, buttonType } from "types";
35

4-
export const Button = ({ children, onClick, disabled, type, textAlign }) => {
6+
interface ButtonComponent {
7+
children: React.ReactNode;
8+
onClick: () => void;
9+
disabled: boolean;
10+
type: buttonType;
11+
textAlign: textAlign;
12+
}
13+
14+
export const Button = ({
15+
children,
16+
onClick,
17+
disabled,
18+
type,
19+
textAlign,
20+
}: ButtonComponent) => {
521
return (
622
<ButtonBox textAlign={textAlign}>
723
<ButtonText onClick={onClick} type={type} disabled={disabled}>
@@ -11,19 +27,19 @@ export const Button = ({ children, onClick, disabled, type, textAlign }) => {
1127
);
1228
};
1329

14-
const ButtonBox = styled.div`
30+
const ButtonBox = styled.div<{ textAlign: textAlign }>`
1531
width: 100%;
1632
text-align: ${(props) => (props.textAlign ? props.textAlign : "right")};
1733
`;
1834

1935
const ButtonText = styled.button`
20-
color: #04c09e;
36+
color: ${COLORS.GREEN_100};
2137
background-color: transparent;
2238
border: none;
2339
font-weight: bold;
2440
cursor: pointer;
2541
2642
&:disabled {
27-
color: #ecebf1;
43+
color: ${COLORS.WHITE_100};
2844
}
2945
`;

0 commit comments

Comments
 (0)