-
Notifications
You must be signed in to change notification settings - Fork 3
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/#73] 게시물 작성 페이지 구현 #102
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
09627cb
fix: 헤더에 아이콘 높이 지정
minjeoong 4ebbafc
feat: 게시물 생성 페이지 헤더 구성
minjeoong c527587
feat: 게시물 생성 페이지 글 작성 섹션까지
minjeoong 1f84961
Merge remote-tracking branch 'origin/develop' into feat/#73/postWrite
minjeoong 1f4c9a1
feat: textField state 하나 추가
minjeoong 8fd4ae4
Merge remote-tracking branch 'origin/develop' into feat/#73/postWrite
minjeoong 7223830
fix: fextField state 하나 추가
minjeoong a40d5da
Merge remote-tracking branch 'origin/develop' into feat/#73/postWrite
minjeoong cc64c04
feat: 드롭다운 구조 변경
minjeoong 8d12c9e
Merge remote-tracking branch 'origin/develop' into feat/#73/postWrite
minjeoong fae909b
feat: 글쓰기 페이지 전체 구성
minjeoong 46f3ad8
feat: 태그에 icon 따라서 변경되도록 수정, 이미지 ref 따라가도록 수정
minjeoong 286768e
fix: bottomSheet 바닥에서 열리도록 수정, button 크기 조정
minjeoong bf02430
fix: bottomSheet 구조 변경
minjeoong 72eb64a
feat: bottom sheet 열릴 때 스크롤 안되도록 구현
minjeoong 573cea5
feat: x 버튼 안 보이는 것 살리기
minjeoong 5d4604b
fix: chip 스크롤 바 제거
minjeoong 95725fa
fix: bottomsheet 강아지, 고양이만 하나만 선택 가능하도록 수정
minjeoong 84e7767
feat: tag 필터랑 동기화 작업
minjeoong 0c0b1ac
feat: fill 다 채워져 있는지 확인하는 코드 추가
minjeoong 4f4ccec
feat: 빌드 에러 해결
minjeoong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as React from "react"; | ||
import type { SVGProps } from "react"; | ||
const SvgIcDeleteBlack = (props: SVGProps<SVGSVGElement>) => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
fill="none" | ||
viewBox="0 0 24 24" | ||
{...props} | ||
> | ||
<path | ||
stroke="#222" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
strokeWidth={1.5} | ||
d="m16.167 7.833-8.334 8.334m0-8.334 8.334 8.334" | ||
/> | ||
</svg> | ||
); | ||
export default SvgIcDeleteBlack; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as React from "react"; | ||
import type { SVGProps } from "react"; | ||
const SvgIcDeleteWhite = (props: SVGProps<SVGSVGElement>) => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
fill="none" | ||
viewBox="0 0 20 20" | ||
{...props} | ||
> | ||
<path | ||
stroke="#fff" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
strokeWidth={1.5} | ||
d="m14.167 5.833-8.334 8.334m0-8.334 8.334 8.334" | ||
/> | ||
</svg> | ||
); | ||
export default SvgIcDeleteWhite; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import * as React from "react"; | ||
import type { SVGProps } from "react"; | ||
const SvgIcImagePlus = (props: SVGProps<SVGSVGElement>) => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
fill="none" | ||
viewBox="0 0 167 167" | ||
{...props} | ||
> | ||
<path fill="#D9D9D9" d="M0 0h167v167H0z" /> | ||
<path | ||
fill="#222" | ||
d="M76.255 93.414H51.338V78.78h24.917V53.863h14.502V78.78h25.049v14.634h-25.05v24.917H76.256z" | ||
/> | ||
</svg> | ||
); | ||
export default SvgIcImagePlus; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as React from "react"; | ||
import type { SVGProps } from "react"; | ||
const SvgIcRightArror = (props: SVGProps<SVGSVGElement>) => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
fill="none" | ||
viewBox="0 0 20 20" | ||
{...props} | ||
> | ||
<path | ||
stroke="#717171" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
strokeWidth={1.5} | ||
d="m7.5 15 5-5-5-5" | ||
/> | ||
</svg> | ||
); | ||
export default SvgIcRightArror; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,34 @@ | ||
export { default as Check } from "./Check"; | ||
export { default as IcBottomSheetLine } from "./IcBottomSheetLine"; | ||
export { default as IcEllipse57 } from "./IcEllipse57"; | ||
export { default as IcImagePlus } from "./IcImagePlus"; | ||
export { default as IcNormal } from "./IcNormal"; | ||
export { default as IcRightIcon } from "./IcRightIcon"; | ||
export { default as IcShape } from "./IcShape"; | ||
export { default as IcChevronLeft } from "./IcChevronLeft"; | ||
export { default as IcChevronRight } from "./IcChevronRight"; | ||
export { default as IcClear } from "./IcClear"; | ||
export { default as IcDelete } from "./IcDelete"; | ||
export { default as IcDeleteBlack } from "./IcDeleteBlack"; | ||
export { default as IcDeleteWhite } from "./IcDeleteWhite"; | ||
export { default as IcEditPen } from "./IcEditPen"; | ||
export { default as IcEllipses } from "./IcEllipses"; | ||
export { default as IcLeftarrow } from "./IcLeftarrow"; | ||
export { default as IcLogo } from "./IcLogo"; | ||
export { default as IcMessage } from "./IcMessage"; | ||
export { default as IcOut } from "./IcOut"; | ||
export { default as IcPlus } from "./IcPlus"; | ||
export { default as IcPostImageSkeleton } from "./IcPostImageSkeleton"; | ||
export { default as IcRightArror } from "./IcRightArror"; | ||
export { default as IcSearch } from "./IcSearch"; | ||
export { default as IcSearchFillter } from "./IcSearchFillter"; | ||
export { default as IcSearchFillterBlue } from "./IcSearchFillterBlue"; | ||
export { default as IcSettings } from "./IcSettings"; | ||
export { default as IcTest } from "./IcTest"; | ||
export { default as IcToastError } from "./IcToastError"; | ||
export { default as Check } from "./Check"; | ||
export { default as IcUp } from "./IcUp"; | ||
export { default as IcoMessage } from "./IcoMessage"; | ||
export { default as IcoSkeleton } from "./IcoSkeleton"; | ||
export { default as Plus } from "./Plus"; | ||
export { default as React } from "./React"; | ||
export { default as Vite } from "./Vite"; | ||
export { default as IcClear } from "./IcClear"; | ||
export { default as IcLeftarrow } from "./IcLeftarrow"; | ||
export { default as IcPostImageSkeleton } from "./IcPostImageSkeleton"; | ||
export { default as IcSearch } from "./IcSearch"; | ||
export { default as IcSearchFillter } from "./IcSearchFillter"; | ||
export { default as IcSearchFillterBlue } from "./IcSearchFillterBlue"; | ||
export { default as IcRight } from "./IcRight"; |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,53 @@ | ||
import React from "react"; | ||
import { styles } from "@common/component/TextField/styles.css.ts"; | ||
import { | ||
InputVariants, | ||
styles, | ||
WrapVariants, | ||
} from "@common/component/TextField/styles.css.ts"; | ||
import { IcClear } from "@asset/svg"; | ||
|
||
interface TextFieldProps { | ||
icon?: React.ReactNode; | ||
state?: "default" | "error" | "centerPlaceholder"; | ||
leftIcon?: React.ReactNode; | ||
active?: boolean; | ||
isDelete?: boolean; | ||
placeholder?: string; | ||
value: string; | ||
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void; | ||
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void; | ||
onClick?: () => void; | ||
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void; | ||
onClearClick?: () => void; | ||
maxLength?: number; // input 입력 가능길이 | ||
} | ||
|
||
type propsType = WrapVariants & TextFieldProps & InputVariants; | ||
|
||
/** | ||
* TextField 공통 컴포넌트 | ||
* @param icon 오른쪽 아이콘 | ||
* @param leftIcon 왼쪽 아이콘 | ||
* @param state 상태 (default, error) | ||
* @param active 활성화 여부 | ||
* @param isDelete value 가 생기면 삭제 아이콘 표시 여부 | ||
* @param placeholder placeholder | ||
* @param value 입력값 | ||
* @param onChange 입력값 변경 함수 | ||
* @param onClick input 클릭 함수 | ||
* @param onKeyDown 엔터키 입력 함수 | ||
* @param onClearClick 입력값 삭제 함수 | ||
* @constructor minjeoong | ||
*/ export const TextField = React.forwardRef<HTMLInputElement, TextFieldProps>( | ||
*/ | ||
|
||
export const TextField = React.forwardRef<HTMLInputElement, propsType>( | ||
( | ||
{ | ||
icon, | ||
leftIcon, | ||
state = "default", | ||
active = true, | ||
placeholder = "검색어를 입력해주세요", | ||
value, | ||
isDelete = "true", | ||
onChange, | ||
onClick, | ||
onKeyDown, | ||
|
@@ -45,18 +58,21 @@ interface TextFieldProps { | |
) => { | ||
return ( | ||
<div className={styles.wrapper({ state, active })} onClick={onClick}> | ||
<input | ||
ref={ref} | ||
type="text" | ||
className={styles.input({ state, active })} | ||
placeholder={placeholder} | ||
value={value} | ||
onChange={onChange} | ||
onKeyDown={onKeyDown} | ||
disabled={!active} | ||
maxLength={maxLength} | ||
/> | ||
{value ? <IcClear onClick={onClearClick} /> : icon} | ||
<div className={styles.leftWrap()}> | ||
{leftIcon && leftIcon} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. p5) 👍 |
||
<input | ||
ref={ref} | ||
type="text" | ||
className={styles.input({ state, active })} | ||
placeholder={placeholder} | ||
value={value} | ||
onChange={onChange} | ||
onKeyDown={onKeyDown} | ||
disabled={!active} | ||
maxLength={maxLength} | ||
/> | ||
</div> | ||
{value && isDelete ? <IcClear onClick={onClearClick} /> : icon} | ||
</div> | ||
); | ||
} | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,10 @@ import { createVar, style } from "@vanilla-extract/css"; | |
import { color, font } from "@style/styles.css.ts"; | ||
|
||
export const container = style({ | ||
position: "absolute", | ||
backgroundColor: "white", | ||
margin: "0 2rem", | ||
width: "calc(100% - 4rem)", | ||
width: "calc(100vw - 4rem)", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. p5) 이번 pr은 확실히 css 수정이 많네요 고생하셨어요! |
||
maxWidth: "72.8rem", | ||
borderRadius: "1.6rem", | ||
boxShadow: "0px 2px 10px 0px rgba(0, 0, 0, 0.15)", | ||
fontSize: "1.4rem", | ||
|
Oops, something went wrong.
Oops, something went wrong.
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.
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.
p5) 최고 ㅜ