Skip to content

Commit

Permalink
merged new changes from main
Browse files Browse the repository at this point in the history
  • Loading branch information
toddalbert committed Oct 31, 2023
2 parents 9e916d4 + 946ab83 commit d33d6dd
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"workbench.colorCustomizations": {
"activityBar.background": "#2C2560",
"titleBar.activeBackground": "#3E3386",
"titleBar.activeForeground": "#FBFBFD"
}
}
16 changes: 15 additions & 1 deletion src/App.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
body {
background-color: #402010;
background-color: #402090;
color: antiquewhite;
padding: 2em;
}
Expand Down Expand Up @@ -33,9 +33,18 @@ main {
cursor: pointer;
}

.selected {
border: 1px solid #ff00d0;
}

.beer-image {
width: 100%;
max-height: 500px;
transition: 0.3s;
}

.beer-image:hover{
transform: scale(1.5);
}

.close-button {
Expand All @@ -61,6 +70,7 @@ main {
max-width: 90%;
}


.beer-card h2 {
font-size: medium;
margin-bottom: 4px;
Expand Down Expand Up @@ -88,3 +98,7 @@ main {
position: absolute;
overflow: hidden;
}

.beer-card:hover, .beer-card:active {
background-color: greenyellow;
}
4 changes: 2 additions & 2 deletions src/components/BeerCard.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useState } from "react";

export default function BeerCard({ name, image, avgRating, setSelectedBeer }) {
export default function BeerCard({ name, image, avgRating, setSelectedBeer, isSelected }) {
const [hidden, setHidden] = useState(false)
if(hidden) return null
return (
<div className="beer-card" onClick={() => setSelectedBeer(name)}>
<div className={`beer-card ${isSelected && 'selected'}`} onClick={() => setSelectedBeer(name)}>
<div className="close-button" onClick={() => setHidden(true)}>x</div>
<div className="beer-image">
<img src={image} alt={name}
Expand Down
1 change: 1 addition & 0 deletions src/components/BeerList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default function BeerList() {
image={beer.image}
avgRating={beer.rating.average}
setSelectedBeer={setSelectedBeer}
isSelected={selectedBeer === beer.name}
/>
))
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function Header() {
return <h1>🍻IPA's Beers🍻</h1>
return <h1>🍻 IPA's 🍻</h1>
}

0 comments on commit d33d6dd

Please sign in to comment.