-
Notifications
You must be signed in to change notification settings - Fork 1
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 #260 from TEAM-MONGDOL/develop
[merge] - develop > main 머지
- Loading branch information
Showing
7 changed files
with
93 additions
and
31 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
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
46 changes: 46 additions & 0 deletions
46
src/app/_components/user/common/containers/UserWktStateFilteringContainer.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,46 @@ | ||
import React from 'react'; | ||
import { WktStatusConverter, WktStatusList } from '@/_types/commonType'; | ||
import UserFilteringTitleAtom from '@/_components/user/common/atoms/UserFilteringTitleAtom'; | ||
import CheckboxModule from '@/_components/common/modules/CheckboxModule'; | ||
import UserFilteringSubContainer from './UserFilteringSubContainer'; | ||
|
||
interface UserWktStateFilteringContainerProps { | ||
selectedOptions: string[]; | ||
onClickOptions: (options: string[]) => void; | ||
} | ||
|
||
const UserWktStateFilteringContainer = ({ | ||
selectedOptions, | ||
onClickOptions, | ||
}: UserWktStateFilteringContainerProps) => { | ||
return ( | ||
<UserFilteringSubContainer> | ||
<UserFilteringTitleAtom text="진행 상태" /> | ||
<div className="flex w-full flex-col gap-y-1.5"> | ||
{WktStatusList.map((option, idx) => { | ||
return ( | ||
<CheckboxModule | ||
option={WktStatusConverter[option]} | ||
isChecked={selectedOptions.includes(option)} | ||
onClick={() => { | ||
if (selectedOptions.includes(option)) { | ||
onClickOptions( | ||
selectedOptions.filter( | ||
(selectedOption) => selectedOption !== option, | ||
), | ||
); | ||
} else { | ||
onClickOptions([...selectedOptions, option]); | ||
} | ||
}} | ||
key={`userStateFiltering${option}`} | ||
size={20} | ||
/> | ||
); | ||
})} | ||
</div> | ||
</UserFilteringSubContainer> | ||
); | ||
}; | ||
|
||
export default UserWktStateFilteringContainer; |
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