-
Notifications
You must be signed in to change notification settings - Fork 0
CW2 28 create modal on sponsor click #16
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
5bc88d0
changed data structure
QuadAces a12aca0
added modal popup
QuadAces 5e81274
added silver sponsors and cleaned up file
QuadAces 2c79d05
made linter stop complaining
QuadAces d67cc64
made linter stop complaining
QuadAces 376f3c2
removed import
QuadAces a2fb171
added type for setFalse
QuadAces e1f7a4e
messed around with css enough to eventually make card responsive and …
QuadAces d5f37d5
changed close to Close
QuadAces 63319d9
fixed imports
QuadAces ddf1a5b
fixed another import
QuadAces 4985eb9
added css transition on hover
QuadAces 789d282
small fixes
derekxu04 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
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,33 @@ | ||
import { MouseEventHandler } from 'react'; | ||
QuadAces marked this conversation as resolved.
Show resolved
Hide resolved
|
||
import { sponsorInfo } from '../../../public/data/data'; | ||
|
||
export default function SponsorModal(props: { sponsorInfo: sponsorInfo | null; setFalse: any }) { | ||
QuadAces marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if (props.sponsorInfo === null) { | ||
return ( | ||
<div> | ||
<h1>Error no sponsor selected!</h1> | ||
</div> | ||
); | ||
} | ||
return ( | ||
<div | ||
className="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50" | ||
onClick={() => { | ||
props.setFalse(); | ||
}} | ||
> | ||
<div className="bg-[#3977f8] mx-[10vw] py-10 rounded-xl overflow-auto flex flex-col items-center justify-center w-[800px]"> | ||
<a className="m-10" href={props.sponsorInfo.href}> | ||
<img src={`./${props.sponsorInfo.svg}`} alt={props.sponsorInfo.alt} /> | ||
QuadAces marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</a> | ||
<h3 className="mx-10 py-10">{props.sponsorInfo.description}</h3> | ||
<button | ||
onClick={props.setFalse} | ||
className="bg-white border text-[#3977F8] border-[#A7A6E5] text-lg rounded-xl w-[70%] xl:h-12 h-10" | ||
> | ||
close | ||
QuadAces marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</button> | ||
</div> | ||
</div> | ||
); | ||
} |
QuadAces marked this conversation as resolved.
Show resolved
Hide resolved
|
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
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.
Uh oh!
There was an error while loading. Please reload this page.