-
Notifications
You must be signed in to change notification settings - Fork 49
Add EventFilter component and styles for event type selection. #344
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
Open
danishzayan
wants to merge
10
commits into
github:main
Choose a base branch
from
danishzayan:event-filter
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+106
−24
Open
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
7a39870
Add EventFilter component and styles for event type selection
danishzayan 0a79750
Merge branch 'main' of https://github.com/danishzayan/maintainermonth…
danishzayan 9e6b33a
Update event details for Open Source Friday: Effection
danishzayan bffdf26
Update components/events-list/events-list.scss
AndreaGriffiths11 408ae2d
Remove semicolons — match existing codebase style
AndreaGriffiths11 540e199
Fix import statement and remove trailing newline
AndreaGriffiths11 20ffda5
Refactor EventsList component imports and formatting
AndreaGriffiths11 bd90a9e
Add flex display to events list header
AndreaGriffiths11 96ac04f
Refactor handleChange function in EventFilter
AndreaGriffiths11 b8eaae4
Fix syntax error in eventTypes.js
AndreaGriffiths11 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 hidden or 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,23 @@ | ||
| import React from 'react'; | ||
|
|
||
| const EventFilter = ({ selectedType, setSelectedType, eventTypes }) => { | ||
| const handleChange = (e) => { | ||
| setSelectedType(e.target.value); | ||
| }; | ||
|
|
||
| return ( | ||
| <select | ||
| className="events-list__select" | ||
| value={selectedType} | ||
| onChange={handleChange} | ||
| > | ||
| {eventTypes.map((type) => ( | ||
| <option key={type.value} value={type.value}> | ||
| {type.label} | ||
| </option> | ||
| ))} | ||
| </select> | ||
| ); | ||
| }; | ||
|
|
||
| export default EventFilter; |
This file contains hidden or 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,38 @@ | ||
| .events-list__controls { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| align-items: center; | ||
| gap: spacing(2); | ||
| } | ||
|
|
||
| .events-list__select { | ||
| appearance: none; | ||
| -webkit-appearance: none; | ||
| background: rgba(255, 255, 255, 0.4); | ||
| padding: 12px 10px; | ||
| margin-top: 8px; | ||
| border-radius: 100px; | ||
| border: none; | ||
|
|
||
| color: $white; | ||
| text-align: center; | ||
| @extend %subtitle-1; | ||
| cursor: pointer; | ||
| transition: all 0.2s ease; | ||
|
|
||
| &:hover { | ||
| background: $white; | ||
| color: $purple; | ||
| transform: translateY(-1px); | ||
| } | ||
|
|
||
| &:focus { | ||
| outline: none; | ||
| box-shadow: 0 0 0 2px $purple; | ||
| } | ||
|
|
||
| option { | ||
| background: $purple; | ||
| color: $white; | ||
| } | ||
| } |
This file contains hidden or 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,14 @@ | ||
| import literals from '../../content/commons.json'; | ||
|
|
||
| const eventTypes = [ | ||
| { value: 'all', label: 'All Events' }, | ||
| { value: 'conference', label: literals['event-type:conference'] }, | ||
| { value: 'podcast', label: literals['event-type:podcast'] }, | ||
| { value: 'stream', label: literals['event-type:stream'] }, | ||
| { value: 'talk', label: literals['event-type:talk'] }, | ||
| { value: 'meetup', label: literals['event-type:meetup'] }, | ||
| { value: 'fundraising', label: literals['event-type:fundraising'] }, | ||
| { value: 'misc', label: literals['event-type:misc'] }, | ||
| ]; | ||
|
|
||
| export default eventTypes; |
This file contains hidden or 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 hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.