목표: 아토믹 디자인 패턴 기반 React + TypeScript UI 라이브러리 구축
진행 상황: Atom 단계 완료 후 Molecules/Organisms 단계 진행 중
주요 작업: 스크롤바 커스터마이징, InputWithButton Molecule 컴포넌트 구현, 폴더 구조 정리
문제 상황:
// 각 약관마다 다른 계산식 사용
(42 - 21) // 이용약관
(42 - 0) // 개인정보처리방침, 마케팅
원인 분석:
문제 상황:
const scrollSpeed = 1.5; // 이용약관, 개인정보처리방침
const scrollSpeed = 0.5; // 마케팅 정보 수신 동의
원인 분석:
문제 상황:
.terms_Content {
font-family: "Pretendard JP", ...; /* 중복 */
font-weight: 400; /* 중복 */
/* ... */
}
원인 분석:
문제 상황:
import { InputField } from "../../atoms/wrapped/InputField/InputField";
원인 분석:
시도 1: 모든 약관을 (42 - 21)로 통일
const scrollbarPosition = (scrollPosition / maxScroll) * (42 - 21);
결과: 여전히 범위가 다름
시도 2: 모든 약관을 (42 - 0)로 통일
const scrollbarPosition = (scrollPosition / maxScroll) * (42 - 0);
결과: ✅ 성공적으로 통일됨
학습 포인트:
시도: 모든 약관을 scrollSpeed = 0.5로 통일
const scrollSpeed = 0.5;
결과: ✅ 성공적으로 통일됨
학습 포인트:
시도 1: terms_Content에서 폰트 속성 직접 설정
.terms_Content {
font-family: "Pretendard JP", ...;
font-weight: 400;
}
문제: 기존 시스템과 중복
시도 2: 기존 label1_Normal 사용
<Typography variant="label1_Normal">
결과: ✅ 성공적으로 통일됨
학습 포인트:
시도: Typography에서 레이아웃 속성 제거
.terms_Content {
/* 폰트 속성만 유지 */
font-size: 14px;
line-height: 20px;
letter-spacing: 0.015em;
}
/* 상위 컴포넌트에서 레이아웃 처리 */
.termsDetailContent p {
margin: 0 !important;
padding: 0 !important;
display: block;
}
결과: ✅ 성공적으로 분리됨
학습 포인트:
// 모든 약관에서 동일한 계산식 사용
const scrollbarPosition = (scrollPosition / maxScroll) * (40 - 0);
// 모든 약관에서 동일한 속도 사용
const scrollSpeed = 0.5;
// 기존 label1_Normal 사용
<Typography variant="label1_Normal">
// 올바른 경로로 수정
import { InputField } from "../InputField/InputField";
// 존재하지 않는 타입 제거
export interface SideBarListItem {
name: string; // IconName → string
}