Conversation
junhakjh
left a comment
There was a problem hiding this comment.
이후 메인에 반영될 범용 드롭다운 컴포넌트를 사용하면 좋을 듯 합니다!
요소의 사이즈 관련 css를 설정할 때 px보다는 rem을 지향하면 좋을 것 같아요!
고생하셨습니다 :)
| <div className={`text-body2 ${selectedBoard ? 'text-deepgray' : 'text-disabled'}`}> | ||
| {selectedBoard || '카테고리'} | ||
| </div> | ||
| <div className='cursor-pointer' onClick={() => setIsOpen(!isOpen)}> |
There was a problem hiding this comment.
BoardDropdown 바깥을 클릭하면 close 되도록 하는 코드도 추가되면 좋을 것 같습니다!
There was a problem hiding this comment.
원래는 그런 방식으로 구현을 하였다가, 화살표 아이콘이 명확하게 있어서 화살표 아이콘만 선택해서 드롭다운을 열고 닫고 하는 방식으로 바꾸었습니다. 추후에 공통으로 재사용 가능한 드롭다운을 만들 예정이라 그때 이 부분 반영해서 구현하겠습니다 :)
리뷰 주셔서 감사해요
안녕하세요 준하님 🙌
의견 주셔서 감사합니다 :) |
okxooxoo
left a comment
There was a problem hiding this comment.
하진님 정말 고생하셨어요! 코드 읽고 많이 배워갑니다!
질문과 건의사항 몇 가지 달았으니 천천히 확인 부탁드립니다 ㅎㅎ
감사합니다 :)
| <div className='mt-[32px] flex justify-end'> | ||
| <Button className='mr-[10px]' type='outlined' onClick={handleCancel}> | ||
| 취소 | ||
| </Button> | ||
| <Button type='filled' onClick={handleSubmit}> | ||
| 등록 | ||
| </Button> |
There was a problem hiding this comment.
mr-[10px] 대신에 버튼을 감싸는 div 태그에 gap-4 스타일을 추가하시는 건 어떻게 생각하시나요?!
그렇게 되면 div 안에 새로운 버튼을 추가하더라도 자동으로 간격이 생길 것 같아요! 🙂
src/App.tsx
Outdated
| import { BrowserRouter, Route, Routes } from 'react-router-dom'; | ||
| import PortfolioPage from '@/components/pages/portfolio'; | ||
| import NewPortfolioPage from '@/components/pages/portfolio/new'; | ||
| import NewPostPage from '@/components/pages/community/post'; |
There was a problem hiding this comment.
기존에 path을 pages의 하위 폴더명과 일치시키자고 이야기 했던 것 같아요!
따라서 /community/new 경로로 이동하니 post가 아닌 new 폴더에 NewPostPage 컴포넌트를 두는 건 어떠세요오?
There was a problem hiding this comment.
엇 경로 수정하면서 폴더명은 수정을 안했네요!!! 감사합니다 :)
수정하겠습니다!
| <MDEditor | ||
| textareaProps={{ | ||
| placeholder: '제목을 입력하세요.', | ||
| maxLength: 30, | ||
| }} | ||
| minHeight={44} | ||
| visibleDragbar={false} | ||
| value={title} | ||
| onChange={handleChange(setTitle)} | ||
| extraCommands={[]} | ||
| hideToolbar={true} | ||
| enableScroll={false} | ||
| preview='edit' | ||
| className='border border-b-0 border-border shadow-none' | ||
| /> | ||
| </div> | ||
| <div className='h-[calc(100%-44px)]'> | ||
| <MDEditor | ||
| textareaProps={{ | ||
| placeholder: '내용을 작성하세요.', | ||
| }} | ||
| visibleDragbar={false} | ||
| height='100%' | ||
| value={content} | ||
| onChange={handleChange(setContent)} | ||
| extraCommands={[]} | ||
| preview='edit' | ||
| className='border border-border shadow-none' |
There was a problem hiding this comment.
자식 컴포넌트 하나하나마다 border 스타일을 추가하는 방법 대신에
이를 감싸는 부모 div에 divide-x 혹은 divide-y을 추가하는 방법도 있어요!
요렇게 하면 좀더 확장성 있게 스타일링 할 수 있을 것 같습니다!
| .title-section .w-md-editor-text { | ||
| display: flex; | ||
| align-items: center; | ||
| height: 44px; | ||
| } | ||
|
|
||
| .title-section textarea.w-md-editor-text-input { |
There was a problem hiding this comment.
요거 제가 정말 잘 몰라서 그러는데.. w-md-editor-text 어떤 클래스인가요?! 궁금합니다!
There was a problem hiding this comment.
react-md-editor 패키지에서 MDEditor 컴포넌트를 사용하고 있는데 거기서 만들어주는 요소 클래스명이에요!!
| <MDEditor.Markdown | ||
| source={content} | ||
| className='h-[calc(100%-44px)] overflow-auto rounded-b-[3px] px-[20px] py-[10px]' | ||
| /> |
There was a problem hiding this comment.
실행해봤는데 마크다운 적용되는 에디터 신기하네요! 정말 고생 많으셨습니다 🥰
지금도 너무 마음에 들고 잘 작동하는데,
좌측 에디터에서 텍스트가 추가될 때마다 우측 에디터에서 자동으로 스크롤이 최하단으로 이동했으면 좋겠습니다!
혹시 그 부분은 구현이 많이 어려울까요? 😮 감사합니다!
2024-12-31.11.47.44.mov
* ✨ feat: useCalendar -> useCalendar, useRecruitCalendar로 분리 * ✨ feat: 캘린더 아이콘 추가 * ✨ feat: DatePicker 컴포넌트 구현 * ✨ feat: 공고 이미지, 직무 상세 요강 제외 채용공고 등록 페이지 구현 * ✨ feat: 취업공고 작성 페이지 라우팅 * ♻️ refactor: useTextInput, useId 적용 * ♻️ refactor: dropdown 컴포넌트 rename, 폴더 이동
…into feature/NewPost
| const [content, setContent] = useState<string>(''); | ||
| const [selectedBoard, setSelectedBoard] = useState<string>('카테고리'); | ||
|
|
||
| const handleChange = (setter: React.Dispatch<React.SetStateAction<string>>) => { |

📍 PR 타입 (하나 이상 선택)
❗️ 관련 이슈 [#]
📄 개요
(기존 컴포넌트 드롭다운은 다중 선택이라 재사용하기 어려운 부분이 있어 새로 구현하였습니다.)
🔁 변경 사항
📸 스크린샷
👀 기타 더 이야기해볼 점