-
Notifications
You must be signed in to change notification settings - Fork 1
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] Styling Status Filter #73
Merged
Merged
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
deb3cc0
[feat] status bar w/o style
4e8961b
[feat] functionality w/o styling
121ad82
[feat] mostly done
13879a0
styling fixes
itsliterallymonique 5b7112d
Merge branch 'main' of github.com:calblueprint/ace-ny
itsliterallymonique b2f66df
added more files to .vercelignore
itsliterallymonique 298cc81
added more files to .vercelignore
itsliterallymonique bc354a0
[refactor] adjusting styling (#74)
itsliterallymonique 75ffd5e
[feat] status bar w/o style
e897c75
[feat] functionality w/o styling
579b3b6
[feat] mostly done
82282ed
[chore] fixed styling
ed83c10
[chore] mc
9bbb350
[chore] fix
6c18ed4
[chore] addressed comments
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
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
Binary file not shown.
Binary file not shown.
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,29 @@ | ||
export const SearchIcon = () => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="14" | ||
height="14" | ||
viewBox="0 0 14 14" | ||
fill="none" | ||
> | ||
<path | ||
d="M12.8063 14L7.98867 9.18149C5.84552 10.7052 2.89234 10.3325 1.19493 8.32411C-0.502472 6.31577 -0.377837 3.34178 1.48166 1.4825C3.34066 -0.377593 6.31494 -0.502768 8.32366 1.19455C10.3324 2.89187 10.7053 5.84533 9.18149 7.98867L13.9992 12.8072L12.8072 13.9992L12.8063 14ZM5.0576 1.68649C3.45905 1.68613 2.07992 2.80824 1.75518 4.37347C1.43045 5.93869 2.24937 7.51682 3.71614 8.15241C5.18291 8.78799 6.89438 8.30633 7.81437 6.99904C8.73436 5.69176 8.61 3.91815 7.51659 2.75204L8.0266 3.25783L7.45168 2.6846L7.44157 2.67448C6.81083 2.03986 5.95234 1.68408 5.0576 1.68649Z" | ||
fill="#4974E0" | ||
/> | ||
</svg> | ||
); | ||
|
||
export const SearchExit = () => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="10" | ||
height="10" | ||
viewBox="0 0 10 10" | ||
fill="none" | ||
> | ||
<path | ||
d="M8.59 0L5 3.59L1.41 0L0 1.41L3.59 5L0 8.59L1.41 10L5 6.41L8.59 10L10 8.59L6.41 5L10 1.41L8.59 0Z" | ||
fill="#4974E0" | ||
/> | ||
</svg> | ||
); |
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
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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
import React from 'react'; //REMOVE | ||
import { FilterType } from '@/types/schema'; | ||
import { ExitIcon } from '../../assets/Dropdown-Icons/icons'; | ||
import COLORS from '../../styles/colors'; | ||
import { | ||
ApplyFiltersText, | ||
FilterNameText, | ||
FilterOptionsText, | ||
} from '../../styles/texts'; | ||
import { | ||
ApplyButtonStyles, | ||
ButtonStyles, | ||
ButtonWithIconStyles, | ||
CheckboxContainer, | ||
CheckboxStyles, | ||
ExitStyles, | ||
FilterDropdownStyles, | ||
OptionTitleStyles, | ||
} from './styles'; | ||
|
||
interface StatusDropdownProps { | ||
selectedStatus: string[]; | ||
setSelectedStatus: (status: string[]) => void; | ||
handleButtonClick: (filter: FilterType) => void; | ||
icon: React.ReactNode; | ||
label: string; | ||
currFilter: FilterType; | ||
} | ||
|
||
export default function StatusDropdown({ | ||
selectedStatus, | ||
setSelectedStatus, | ||
handleButtonClick, | ||
icon, | ||
label, | ||
currFilter, | ||
}: StatusDropdownProps) { | ||
const filterOptions = [ | ||
{ title: 'In Progress', color: `${COLORS.ashGrey}` }, | ||
{ title: 'Operational', color: `${COLORS.chateauGreen}` }, | ||
]; | ||
|
||
const handleStatusChange = (status: string) => { | ||
setSelectedStatus(selectedStatus[0] === status ? [] : [status]); | ||
}; | ||
|
||
const isApplyButtonActive = selectedStatus.length > 0; | ||
|
||
return ( | ||
<FilterDropdownStyles> | ||
<ButtonWithIconStyles onClick={() => handleButtonClick(currFilter)}> | ||
<FilterNameText>{icon}</FilterNameText> | ||
<ButtonStyles> | ||
<FilterNameText>{label}</FilterNameText> | ||
</ButtonStyles> | ||
<ExitStyles> | ||
<ExitIcon /> | ||
</ExitStyles> | ||
</ButtonWithIconStyles> | ||
<div> | ||
{filterOptions.map(option => ( | ||
<CheckboxContainer key={option.title}> | ||
<CheckboxStyles | ||
type="checkbox" | ||
checked={selectedStatus.includes(option.title)} | ||
onChange={() => handleStatusChange(option.title)} | ||
/> | ||
<OptionTitleStyles color={option.color}> | ||
<FilterOptionsText $color={option.color}> | ||
{' '} | ||
{option.title} | ||
</FilterOptionsText> | ||
</OptionTitleStyles> | ||
</CheckboxContainer> | ||
))} | ||
</div> | ||
<ApplyButtonStyles isActive={isApplyButtonActive}> | ||
<ApplyFiltersText>APPLY</ApplyFiltersText> | ||
</ApplyButtonStyles> | ||
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. below this, add |
||
</FilterDropdownStyles> | ||
); | ||
} |
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.
below this, add to wrap around all the filter content
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.
Should look like this: