Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions src/Components/CityCards.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
const CityCard = ({ city, onClick }) => {
return (
<div
onClick={onClick}
className="city-card glassCard w-[8rem] h-[3rem] p-2 cursor-pointer flex flex-col justify-center items-center text-center opacity-75 hover:opacity-100 transition-opacity"
>
<p className="font-bold text-lg">{city}</p>
</div>
)
function CityCard({ city, onClick, isSelected }) {
return (
<div
onClick={onClick}
className={`cursor-pointer px-4 py-2 rounded-lg transition-colors ${
isSelected ? "bg-blue-600 text-white" : "bg-gray-200 text-black"
}`}
>
{city}
</div>
)
}

export default CityCard