{src ? (
-
+
) : (
)}
diff --git a/src/renderer/src/components/button/button.css.ts b/src/renderer/src/components/button/button.css.ts
deleted file mode 100644
index 51f7509e..00000000
--- a/src/renderer/src/components/button/button.css.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-import { style, styleVariants } from "@vanilla-extract/css";
-import { SPACING_UNIT, vars } from "../../theme.css";
-
-const base = style({
- padding: `${SPACING_UNIT}px ${SPACING_UNIT * 2}px`,
- backgroundColor: vars.color.muted,
- borderRadius: "8px",
- border: "solid 1px transparent",
- transition: "all ease 0.2s",
- cursor: "pointer",
- minHeight: "40px",
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- gap: `${SPACING_UNIT}px`,
- ":active": {
- opacity: vars.opacity.active,
- },
- ":disabled": {
- opacity: vars.opacity.disabled,
- cursor: "not-allowed",
- },
-});
-
-export const button = styleVariants({
- primary: [
- base,
- {
- ":hover": {
- backgroundColor: "#DADBE1",
- },
- ":disabled": {
- backgroundColor: vars.color.muted,
- },
- },
- ],
- outline: [
- base,
- {
- backgroundColor: "transparent",
- border: `solid 1px ${vars.color.border}`,
- color: vars.color.muted,
- ":hover": {
- backgroundColor: "rgba(255, 255, 255, 0.1)",
- },
- ":disabled": {
- backgroundColor: "transparent",
- },
- },
- ],
- dark: [
- base,
- {
- backgroundColor: vars.color.darkBackground,
- color: "#c0c1c7",
- },
- ],
- danger: [
- base,
- {
- borderColor: "transparent",
- backgroundColor: "#a31533",
- color: "#c0c1c7",
- ":hover": {
- backgroundColor: "#b3203f",
- },
- },
- ],
-});
diff --git a/src/renderer/src/components/button/button.scss b/src/renderer/src/components/button/button.scss
new file mode 100644
index 00000000..0dea5576
--- /dev/null
+++ b/src/renderer/src/components/button/button.scss
@@ -0,0 +1,63 @@
+@use "../../scss/globals.scss";
+
+.button {
+ padding: globals.$spacing-unit globals.$spacing-unit * 2;
+ background-color: globals.$muted-color;
+ border-radius: 8px;
+ border: solid 1px transparent;
+ transition: all ease 0.2s;
+ cursor: pointer;
+ min-height: 40px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: globals.$spacing-unit;
+
+ &:active {
+ opacity: globals.$active-opacity;
+ }
+
+ &:disabled {
+ opacity: globals.$disabled-opacity;
+ cursor: not-allowed;
+ }
+
+ &--primary {
+ &:hover {
+ background-color: #dadbe1;
+ }
+
+ &:disabled {
+ background-color: globals.$muted-color;
+ }
+ }
+
+ &--outline {
+ background-color: transparent;
+ border: solid 1px globals.$border-color;
+ color: globals.$muted-color;
+
+ &:hover {
+ background-color: rgba(255, 255, 255, 0.1);
+ }
+
+ &:disabled {
+ background-color: transparent;
+ }
+ }
+
+ &--dark {
+ background-color: globals.$dark-background-color;
+ color: globals.$muted-color;
+ }
+
+ &--danger {
+ border-color: transparent;
+ background-color: globals.$danger-color;
+ color: globals.$muted-color;
+
+ &:hover {
+ background-color: #b3203f;
+ }
+ }
+}
diff --git a/src/renderer/src/components/button/button.tsx b/src/renderer/src/components/button/button.tsx
index 66a67889..8d8bf1dd 100644
--- a/src/renderer/src/components/button/button.tsx
+++ b/src/renderer/src/components/button/button.tsx
@@ -1,12 +1,13 @@
import cn from "classnames";
-import * as styles from "./button.css";
+
+import "./button.scss";
export interface ButtonProps
extends React.DetailedHTMLProps<
React.ButtonHTMLAttributes
,
HTMLButtonElement
> {
- theme?: keyof typeof styles.button;
+ theme?: "primary" | "outline" | "dark" | "danger";
}
export function Button({
@@ -18,7 +19,7 @@ export function Button({
return (
diff --git a/src/renderer/src/pages/game-details/game-details-content.tsx b/src/renderer/src/pages/game-details/game-details-content.tsx
index d24051e4..70ce165f 100644
--- a/src/renderer/src/pages/game-details/game-details-content.tsx
+++ b/src/renderer/src/pages/game-details/game-details-content.tsx
@@ -11,9 +11,8 @@ import * as styles from "./game-details.css";
import { useTranslation } from "react-i18next";
import { cloudSyncContext, gameDetailsContext } from "@renderer/context";
import { steamUrlBuilder } from "@shared";
-import Lottie from "lottie-react";
-import cloudAnimation from "@renderer/assets/lottie/cloud.json";
+import cloudIconAnimated from "@renderer/assets/icons/cloud-animated.gif";
import { useUserDetails } from "@renderer/hooks";
const HERO_ANIMATION_THRESHOLD = 25;
@@ -165,10 +164,9 @@ export function GameDetailsContent() {
position: "relative",
}}
>
-
diff --git a/src/renderer/src/pages/game-details/game-details.tsx b/src/renderer/src/pages/game-details/game-details.tsx
index a4b64225..4fbcc855 100644
--- a/src/renderer/src/pages/game-details/game-details.tsx
+++ b/src/renderer/src/pages/game-details/game-details.tsx
@@ -6,9 +6,8 @@ import type { GameRepack, GameShop, Steam250Game } from "@types";
import { Button, ConfirmationModal } from "@renderer/components";
import { buildGameDetailsPath } from "@renderer/helpers";
-import starsAnimation from "@renderer/assets/lottie/stars.json";
+import starsIconAnimated from "@renderer/assets/icons/stars-animated.gif";
-import Lottie from "lottie-react";
import { useTranslation } from "react-i18next";
import { SkeletonTheme } from "react-loading-skeleton";
import { GameDetailsSkeleton } from "./game-details-skeleton";
@@ -194,15 +193,15 @@ export default function GameDetails() {