Skip to content

Conversation

@imtaejunk
Copy link
Collaborator

BaseTextArea 에서

value: 현재 입력값을 React 상태로 유지하고, 화면에 표시
onChange: 사용자의 입력 이벤트를 부모 컴포넌트로 전달하여 상태를 업데이트

추가했습니다.

예시)
export default function TextArea(props: TextAreaProps) {
return (
<textarea
value={props.value} // 부모로부터 받은 값
onChange={props.onChange} // 부모로부터 받은 상태 업데이트 함수
placeholder="텍스트를 입력하세요"

제목과 내용을 써서 등록하기 버튼을 눌러야하는데, 제목과 내용에 텍스트를 입력해도 입력된 텍스트가 없다고 떠서, 페이지 내에서 수정해보려고 했는데 잘 되지 않아서 추가했습니다.

@hongggyelim
Copy link
Collaborator

리액트 훅 폼 사용하면 BaseTextarea 컴포넌트 내에서 value, onChange prop 을 별도로 지정할 필요가 없습니다 !

Copy link
Collaborator

Choose a reason for hiding this comment

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

페이지 경로는 가이드 문서를 따라주세요
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

컴포넌트에 value, onChange prop을 추가하지 않고 페이지에서 리액트 훅 폼을 사용해주세요
컴포넌트에 prop을 추가하면 리액트 훅폼 쓰는 페이지에서 에러가 발생합니다

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

수정해서 다시 올리겠습니다


className="bg-primary-orange-100 text-white hover:bg-primary-orange-300"

className="bg-primary-grayscale-500 hover:bg-primary-grayscale-600 text-white"
Copy link
Collaborator

Choose a reason for hiding this comment

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

gray 색상 쓸때는 primary 없이 bg-grayscale-숫자 요렇게 써주셔야돼요

@yyezzzy yyezzzy self-requested a review December 6, 2024 03:57
Copy link
Collaborator

@yyezzzy yyezzzy left a comment

Choose a reason for hiding this comment

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

콜솔출력도 한글로 잘 해주셨네요 ! 수정할 부분 수정되면 머지해주세요 ~

Comment on lines 5 to 8
import Button from "../../../components/button/default/Button";
import BaseTextArea from "../../../components/input/textarea/BaseTextArea";
import ImageInputwithPlaceHolder from "../../../components/input/file/ImageInput/ImageInputwithPlaceHolder";
import { usePost } from "../../../../hooks/usePost";
Copy link
Collaborator

Choose a reason for hiding this comment

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

"@/" 경로로 자동완성 안되던가요 ?

Comment on lines 6 to 15
@params variant: "white" | "transparent" - 필수값
@params name: string - 필수값
@params size: "w-[00px] h-[00px] lg:w-[00px] lg:h-[00px]" - 기본값: "w-[327px] h-[132px] lg:w-[640px] lg:h-[160px]"
@params placeholder: string
@params errorMessage: string - 에러메시지 + 테두리 색상 변경
@params disabled: boolean
@params wrapperClassName?: string; - 부가적인 tailwind css 클래스
@params innerClassName?: string; - 부가적인 tailwind css 클래스
@params value: string - 현재 입력된
@params onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void - 변경 핸들러
Copy link
Collaborator

Choose a reason for hiding this comment

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

어노테이션 추가 잘 해주셨군요 ~

@github-actions
Copy link

github-actions bot commented Dec 6, 2024

💄 Storybook: https://673dcf13c9a3a1189a7c6fd4-hjwlxmplth.chromatic.com/ # Chromatic에서 생성된 Storybook URL
🕖 Update: 2024년 12월 07일 03시 22분 15초 # 현재 시간

@imtaejunk imtaejunk closed this Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants