modern-agile-team / modern-kit

@modern-kit은 클라이언트 개발에 유용한 모듈들을 제공하는 오픈소스 라이브러리 입니다.
https://modern-agile-team.github.io/modern-kit/
MIT License
44 stars 8 forks source link

feat(react): SeparatedIterator 신규 컴포넌트 추가 #274

Closed ssi02014 closed 1 week ago

ssi02014 commented 1 week ago

Overview

Issue: https://github.com/modern-agile-team/modern-kit/issues/269

Iterator를 확장해 items props로 주어진 배열을 반복하면서 각 항목에 대해 특정 요소 및 컴포넌트를 렌더링하며, 동시에 각 요소 사이에 Separator를 렌더링 하는 컴포넌트입니다.

기본적으로 마지막 요소 다음 Separator는 제외됩니다. includeLastSeparatortrue로 설정해서 포함시킬 수 있습니다.

<SeparatedIterator
  items={items}
  renderItem={(item) => <h3>{item}</h3>}
  separator={<Divider />}
/>

PR Checklist

changeset-bot[bot] commented 1 week ago

🦋 Changeset detected

Latest commit: 3e3f1ec3d205a5815f31c4d42657403a23657aa6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------------- | ----- | | @modern-kit/react | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.84%. Comparing base (58d7750) to head (3e3f1ec).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/modern-agile-team/modern-kit/pull/274/graphs/tree.svg?width=650&height=150&src=pr&token=HSFRRRH8Q3&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modern-agile-team)](https://app.codecov.io/gh/modern-agile-team/modern-kit/pull/274?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modern-agile-team) ```diff @@ Coverage Diff @@ ## main #274 +/- ## ========================================== + Coverage 96.83% 96.84% +0.01% ========================================== Files 116 117 +1 Lines 1231 1237 +6 Branches 303 305 +2 ========================================== + Hits 1192 1198 +6 Misses 33 33 Partials 6 6 ``` | [Components](https://app.codecov.io/gh/modern-agile-team/modern-kit/pull/274/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modern-agile-team) | Coverage Δ | | |---|---|---| | [@modern-kit/react](https://app.codecov.io/gh/modern-agile-team/modern-kit/pull/274/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modern-agile-team) | `94.42% <100.00%> (+0.04%)` | :arrow_up: | | [@modern-kit/utils](https://app.codecov.io/gh/modern-agile-team/modern-kit/pull/274/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modern-agile-team) | `100.00% <ø> (ø)` | |