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

autosizeInput & autosizeButton 컴포넌트 추가 #31

Merged
merged 6 commits into from
Apr 30, 2020

Conversation

YuuRiLee
Copy link
Contributor

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

@YuuRiLee YuuRiLee added the enhancement New feature or request label Apr 16, 2020
@YuuRiLee YuuRiLee self-assigned this Apr 16, 2020
Copy link
Member

@zoripong zoripong left a comment

Choose a reason for hiding this comment

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

문제는 없어보이지만 몇 개 코멘트가 달아뒀습니다! 커밋이 매우 깔끔하니 좋군여 👍

src/modules/autosizeInput/types.ts Outdated Show resolved Hide resolved
src/modules/index.ts Show resolved Hide resolved
src/hooks/useAutosizeInput.tsx Show resolved Hide resolved
src/components/autosizeInput/index.tsx Show resolved Hide resolved
src/components/autosizeInput/index.tsx Show resolved Hide resolved
src/components/autosizeInput/index.tsx Show resolved Hide resolved
src/components/autosizeInput/index.tsx Outdated Show resolved Hide resolved
src/components/autosizeInput/index.tsx Outdated Show resolved Hide resolved
src/components/autosizeButton/index.tsx Show resolved Hide resolved
src/components/autosizeButton/index.tsx Outdated Show resolved Hide resolved
@YuuRiLee YuuRiLee requested a review from zoripong April 30, 2020 09:01
Copy link
Member

@zoripong zoripong left a comment

Choose a reason for hiding this comment

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

고생하셧소ㅜㅁ니다

@YuuRiLee YuuRiLee merged commit 15c9656 into k-roffle:master Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants