generated from ooooorobo/react-mobile-web-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from wanted-fork-fork/develop
[Release] v0.3.1 스터디 생성 페이지
- Loading branch information
Showing
35 changed files
with
731 additions
and
34 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Dayjs } from "dayjs"; | ||
import dayjsGenerateConfig from "rc-picker/lib/generate/dayjs"; | ||
import generatePicker from "antd/lib/date-picker/generatePicker"; | ||
import "antd/lib/date-picker/style/index"; | ||
|
||
const DatePicker = generatePicker<Dayjs>(dayjsGenerateConfig); | ||
|
||
export default DatePicker; |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
function CalendarIcon({ color = "#222" }) { | ||
return ( | ||
<svg | ||
width="24" | ||
height="24" | ||
viewBox="0 0 24 24" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<rect x="3.5" y="5.5" width="17" height="13" rx="1.5" stroke={color} /> | ||
<path | ||
d="M3.5 7C3.5 6.17157 4.17157 5.5 5 5.5H19C19.8284 5.5 20.5 6.17157 20.5 7V9.5H3.5V7Z" | ||
stroke={color} | ||
/> | ||
<path d="M8 4V8" stroke={color} strokeLinecap="round" /> | ||
<path d="M16 4V8" stroke={color} strokeLinecap="round" /> | ||
</svg> | ||
); | ||
} | ||
|
||
export default CalendarIcon; |
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,26 @@ | ||
function CloseIcon() { | ||
return ( | ||
<svg | ||
width="24" | ||
height="24" | ||
viewBox="0 0 24 24" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M16.8117 17.0877L6.91217 7.18817L7.85498 6.24536L17.7545 16.1449L16.8117 17.0877Z" | ||
fill="#333333" | ||
/> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M17.7539 7.18833L7.85443 17.0878L6.91162 16.145L16.8111 6.24552L17.7539 7.18833Z" | ||
fill="#333333" | ||
/> | ||
</svg> | ||
); | ||
} | ||
|
||
export default CloseIcon; |
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,26 @@ | ||
function PinIcon() { | ||
return ( | ||
<svg | ||
width="32" | ||
height="32" | ||
viewBox="0 0 32 32" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M19.4471 18.5679C20.6228 15.8725 21.3336 13.2709 21.3336 11.7946C21.3336 8.6613 18.8909 6.22236 16.0003 6.22236C13.1097 6.22236 10.6669 8.6613 10.6669 11.7946C10.6669 13.2709 11.3777 15.8725 12.5535 18.5679C13.6063 20.9816 14.8829 23.1281 16.0003 24.346C17.1176 23.1281 18.3942 20.9816 19.4471 18.5679ZM16.8312 26.0313C19.7786 23.3013 23.1114 15.4999 23.1114 11.7946C23.1114 7.73528 19.9276 4.44458 16.0003 4.44458C12.0729 4.44458 8.88916 7.73528 8.88916 11.7946C8.88916 15.4999 12.222 23.3013 15.1693 26.0313C15.6446 26.4714 16.356 26.4714 16.8312 26.0313Z" | ||
fill="#333333" | ||
/> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M16.0001 14.2224C17.4729 14.2224 18.6668 13.0285 18.6668 11.5558C18.6668 10.083 17.4729 8.88911 16.0001 8.88911C14.5273 8.88911 13.3334 10.083 13.3334 11.5558C13.3334 13.0285 14.5273 14.2224 16.0001 14.2224ZM16.0001 16.0002C18.4547 16.0002 20.4446 14.0104 20.4446 11.5558C20.4446 9.10117 18.4547 7.11133 16.0001 7.11133C13.5455 7.11133 11.5557 9.10117 11.5557 11.5558C11.5557 14.0104 13.5455 16.0002 16.0001 16.0002Z" | ||
fill="#333333" | ||
/> | ||
</svg> | ||
); | ||
} | ||
|
||
export default PinIcon; |
File renamed without changes.
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
45 changes: 45 additions & 0 deletions
45
src/components/molecules/AutocompleteCategory.component.tsx
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,45 @@ | ||
import AutoCompleteInputComponent from "@src/components/molecules/AutoCompleteInput.component"; | ||
import { useStores } from "@src/store/root.store"; | ||
import { observer } from "mobx-react"; | ||
import useInput from "@src/hooks/useInput.hook"; | ||
import { useCallback, useEffect } from "react"; | ||
|
||
const AutocompleteCategoryComponent = observer( | ||
({ selected, setSelected, placeholder }) => { | ||
const { categoryStore } = useStores(); | ||
|
||
useEffect(() => { | ||
categoryStore.getCategoryList(); | ||
}, [categoryStore]); | ||
|
||
const { value, handleChange, setValue } = useInput(""); | ||
const handleSelect = useCallback( | ||
(e) => { | ||
const id = e.key; | ||
const category = categoryStore.categoryList.find( | ||
(x) => x.id.toString() === id, | ||
); | ||
setValue(category?.name || ""); | ||
setSelected(id); | ||
}, | ||
[categoryStore.categoryList, setValue, setSelected], | ||
); | ||
|
||
return ( | ||
<AutoCompleteInputComponent | ||
shape="light" | ||
fontSize="small" | ||
list={categoryStore.categoryList} | ||
labelKeyName="name" | ||
valueKeyName="id" | ||
placeholder={placeholder} | ||
inputValue={value} | ||
selected={selected} | ||
onChange={handleChange} | ||
onSelect={handleSelect} | ||
/> | ||
); | ||
}, | ||
); | ||
|
||
export default AutocompleteCategoryComponent; |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.