-
Notifications
You must be signed in to change notification settings - Fork 2
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
autosizeInput & autosizeButton 컴포넌트 추가 #31
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zoripong
reviewed
Apr 30, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
문제는 없어보이지만 몇 개 코멘트가 달아뒀습니다! 커밋이 매우 깔끔하니 좋군여 👍
zoripong
approved these changes
Apr 30, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셧소ㅜㅁ니다
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
input에 글자를 입력하면 입력한 글자 수에 따라서 width가 늘어났다가 작아졌다하는 컴포넌트입니다.
AutosizeInput은 input에 대한 컴포넌트이고, AutosizeButton은 AutosizeInput을 활용한 button 모양의 컴포넌트입니다.
width는 redux를 활용해서 변경합니다.
minWidth : 최소 길이를 정할 수 있고 만약 설정하지 않는다면 길이는 1
placeholder: minWidth를 설정하지 않고 placeholder를 설정한다면 처음 width는 placeholder width만큼 입니다.
maxLength: 최대 글자 길이입니다.
onChange, onBlur, onKeyDown 이벤트를 설정할 수 있습니다.
AutosizeButton에서 onCancle 속성은 x아이콘을 클릭했을 때 이벤트입니다.
![화면-기록-2020-04-17-오전-3 59 37](https://user-images.githubusercontent.com/26711037/79495936-56d16280-8060-11ea-96f8-4ae0741e3902.gif)