mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-19 01:03:57 +00:00
fix: create game-item__plus-wrapper--added classname
This commit is contained in:
@@ -16,6 +16,11 @@
|
||||
|
||||
&:hover {
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
|
||||
.game-item__plus-wrapper {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
}
|
||||
|
||||
&__plus-wrapper {
|
||||
@@ -28,16 +33,7 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&:hover .game-item__plus-wrapper {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
&__plus-wrapper.added {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
&:hover .game-item__plus-wrapper.added {
|
||||
&__plus-wrapper--added {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import "./game-item.scss";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { CatalogueSearchResult } from "@types";
|
||||
import { QuestionIcon, PlusIcon, CheckIcon } from "@primer/octicons-react";
|
||||
import cn from "classnames";
|
||||
|
||||
export interface GameItemProps {
|
||||
game: CatalogueSearchResult;
|
||||
@@ -116,7 +117,9 @@ export function GameItem({ game }: GameItemProps) {
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className={"game-item__plus-wrapper" + (added ? " added" : "")}
|
||||
className={cn("game-item__plus-wrapper", {
|
||||
"game-item__plus-wrapper--added": added,
|
||||
})}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
onClick={addGameToLibrary}
|
||||
|
||||
Reference in New Issue
Block a user