Skip to content

feat: 요일별 스트릭 표시용 CheckMarkGroup 컴포넌트 추가 - #24

Merged
hamxxn merged 3 commits into
developfrom
feat/issue-22
Aug 12, 2026
Merged

feat: 요일별 스트릭 표시용 CheckMarkGroup 컴포넌트 추가#24
hamxxn merged 3 commits into
developfrom
feat/issue-22

Conversation

@hamxxn

@hamxxn hamxxn commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

읽기 전용으로 체크 여부를 나열하는 UI(요일별 스트릭 등)가 필요해서 shared/ui/check-markCheckMarkGroup 컴파운드 컴포넌트를 추가했다. CheckIcon도 함께 추가했다.

Related Issues

PR Point (To Reviewer)

  • 원래 이슈에서는 Checkbox라는 이름으로 시작했는데, 클릭 불가능한 순수 표시 컴포넌트(폼 컨트롤 아님, onClick/role=checkbox 없음)라 <input type="checkbox">를 연상시키는 이름을 피하려고 CheckMarkGroup으로 바꿨다.
  • 이슈의 완료조건 스니펫은 ItemisChecked/label을 직접 받는 단일 컴포넌트 형태였지만, 구현 중에 Item/Indicator/Label 세 조각으로 분리했다. ItemisChecked를 Context로 하위 Indicator/Label에 전달하는 방식이라, label 없이 인디케이터만 쓰거나 Label의 텍스트 색을 isChecked에 따라 다르게 하는 것도 자연스럽게 지원된다. 아래 사용법 참고.
  • CHECK_MARK_BASE.LABEL_BASE(라벨 타이포 클래스)는 아직 Figma 타이포 토큰이 확정되지 않아 빈 문자열로 남아있다 — 후속 확인 필요.

사용법

import { CheckMarkGroup } from "@/shared/ui/check-mark";

const WEEK_DAYS = [
  { label: "월", isChecked: true },
  { label: "화", isChecked: true },
  { label: "토", isChecked: false },
  { label: "일", isChecked: false },
];

function WeekStreak() {
  return (
    <CheckMarkGroup>
      {WEEK_DAYS.map((day) => (
        <CheckMarkGroup.Item key={day.label} isChecked={day.isChecked}>
          <CheckMarkGroup.Indicator />
          <CheckMarkGroup.Label label={day.label} />
        </CheckMarkGroup.Item>
      ))}
    </CheckMarkGroup>
  );
}

// label 없이 인디케이터만 쓰는 것도 가능
<CheckMarkGroup>
  <CheckMarkGroup.Item isChecked={true}>
    <CheckMarkGroup.Indicator />
  </CheckMarkGroup.Item>
</CheckMarkGroup>;

Screenshot

스크린샷 2026-08-09 오후 6 34 34

ETC

없음

읽기 전용으로 체크 여부를 나열하는 UI(요일별 스트릭 등)가 필요해서
shared/ui/check-mark에 CheckMarkGroup 컴파운드 컴포넌트를 추가했다.
클릭 불가능한 순수 표시 컴포넌트라 실제 폼 컨트롤을 연상시키는
"Checkbox"라는 이름 대신 CheckMarkGroup으로 명명했다. Item이
isChecked를 Context로 하위 Indicator/Label에 전달해서 각 조각을
독립적으로 조합할 수 있게 했고, label은 선택 사항으로 뒀다.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@hamxxn hamxxn self-assigned this Aug 10, 2026
@hamxxn hamxxn linked an issue Aug 10, 2026 that may be closed by this pull request
3 tasks
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aligner Ready Ready Preview Aug 12, 2026 1:41am

CheckMarkGroup 데모용으로 HomePage.tsx를 바꿔뒀는데, 이슈 #22 범위 밖이라
develop 상태로 되돌린다. 사용법은 PR 설명에 코드 스니펫으로 남겨둔다.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@sohxxny sohxxny left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

고생하셨습니다! 이거 타이포 결정되면 그때 수정하고 머지할까요?

@thwjddlqslek thwjddlqslek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

수고하셨습니다!

);
}

type CheckMarkGroupIndicatorProps = HTMLAttributes<HTMLDivElement>;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

읽기 전용인 컴포넌트임을 코드만으로는 파악하기 어려울 같아요!
주석 추가 or HTMLAttributes에서 이벤트 핸들러를 omit or pick 해서 타입을 좁히는게 좋을 듯 합니당

label쪽도 동일합니닷

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

넵!

Comment thread src/shared/ui/check-mark/theme.ts Outdated
Indicator/Label props에서 이벤트 핸들러를 Omit해 읽기 전용 컴포넌트임을
타입으로 드러냈다. 라벨 폰트를 typo-caption-2-emphasized로 확정하고
unchecked 텍스트 색상을 gray-70으로 조정했다.
@hamxxn
hamxxn merged commit d09a427 into develop Aug 12, 2026
4 checks passed
@hamxxn
hamxxn deleted the feat/issue-22 branch August 12, 2026 01:46
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: 요일별 스트릭 표시용 CheckMarkGroup 컴포넌트 추가

3 participants