Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: develop useSwitch custom hook #20

Merged
merged 2 commits into from
May 27, 2024
Merged

feat: develop useSwitch custom hook #20

merged 2 commits into from
May 27, 2024

Conversation

dev2820
Copy link
Contributor

@dev2820 dev2820 commented May 26, 2024

다음 2가지 훅이 추가되었습니다.

useBoolean

useSwitch, useDisclosure 등 true-false 상태를 가지는 컴포넌트를 구현하는데 기초가 되는 훅입니다.

useSwitch

켜고 끌 수 있는 스위치(=토글)에 사용되는 훅입니다. (참고)
useBoolean에 종속적입니다.
자세한 설명은 storybook 참고 부탁드립니다.

@dev2820
Copy link
Contributor Author

dev2820 commented May 26, 2024

앞으로는 어떤 형식으로 기여를 해야할까요? CONTRIBUTING 문서가 있으면 좋을 것 같네요

@d0422 d0422 self-requested a review May 26, 2024 08:42
Copy link
Member

@d0422 d0422 left a comment

Choose a reason for hiding this comment

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

@dev2820 안녕하세요! 기여해주셔서 감사합니다!! ☺️
CONTRIBUTING문서가 필요할 것 같네요! 좋은 의견 감사합니다!!! 타 라이브러리 참고해서 빠른 시일 내에 추가해보도록 하겠습니다.
혹시 기여 방식에 대해 원하시는 부분이나, 좋은 의견이 있다면 언제든 말씀해주세요!

@@ -0,0 +1,7 @@
import { useState } from 'react';

export type UseSwitchReturn = ReturnType<typeof useBoolean>;
Copy link
Member

Choose a reason for hiding this comment

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

혹시 여기 따로 타입지 정을 해주신 이유가 있을까용?
useSwitch 와 useBoolean모두 UseSwitchReturn이라는 이름으로 타입이 기재되어있어서 여쭤봅니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

앗 수정해야겠네요. 실수입니다

Copy link
Member

Choose a reason for hiding this comment

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

Storybook 내부적으로 css 속성들이 겹치는 문제가 발생해서 vanilla extract를 도입하였는데요, 혹시 괜찮으시면 이후에 이 부분 내용이 바뀌어도 괜찮으신지 여쭤보고 싶습니다...!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

네 괜찮습니다

Copy link
Member

Choose a reason for hiding this comment

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

네 감사합니당

@d0422 d0422 added the feature label May 26, 2024
Copy link
Member

@d0422 d0422 left a comment

Choose a reason for hiding this comment

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

머지하겠습니다!
감사합니다!

@d0422 d0422 merged commit 2877b5a into Rapiders:main May 27, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants