modern-agile-team / modern-kit

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

fix(react): useVhProperty 옵션 및 문서 수정 #254

Closed ssi02014 closed 3 months ago

ssi02014 commented 3 months ago

Overview

기존 useVhProperty의 enabledResize 옵션을 사용하려면 무조건 name 인자를 추가해줘야한다는 불편함이 있었습니다. 따라서 이런 불편함을 해결하기 위해 하나의 options로 변경합니다. -> 네이밍도 UseVhPropertyProps로 변경합니다.

추가로 boolean형태의 옵션 네이밍에서 enable보다 enabled 형태가 많이 사용되는 것 같아 enableResize에서 enabledResize 로 네이밍을 변경합니다. 🙏

// as-is
// name이 기본 값과 동일한 'vh'임에도 넣어줘야했음
useVhProperty('vh', {
  enableResize: true,
})

// to-be
useVhProperty({
  enabledResize: true,
})

PR Checklist

changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: 3636729f9cd31b0597d68b5f9ee22e06b0afa34c

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 | Patch |

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 3 months ago

Codecov Report

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

Project coverage is 96.62%. Comparing base (26343a2) to head (3636729).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/modern-agile-team/modern-kit/pull/254/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/254?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 #254 +/- ## ========================================== - Coverage 96.62% 96.62% -0.01% ========================================== Files 111 111 Lines 1155 1154 -1 Branches 283 285 +2 ========================================== - Hits 1116 1115 -1 Misses 33 33 Partials 6 6 ``` | [Components](https://app.codecov.io/gh/modern-agile-team/modern-kit/pull/254/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/254/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modern-agile-team) | `93.80% <100.00%> (-0.01%)` | :arrow_down: | | [@modern-kit/utils](https://app.codecov.io/gh/modern-agile-team/modern-kit/pull/254/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% <ø> (ø)` | |