Skip to content

Commit 6e8c5d1

Browse files
🌗 feat: Add dark theme support for logo in Update component
The `Update` component in `src/components/Update.tsx` is enhanced with dark theme support. It now includes a conditional rendering of the ScreenLink logo based on the current theme. This is achieved by importing a new `screenlinkLogoDark` asset and utilizing the `useTheme` hook to determine the active theme. If the dark theme is active, the component renders the `screenlinkLogoDark`; otherwise, it displays the standard `screenlinkLogo`. This change improves the visual consistency and user experience, especially for users who prefer dark mode interfaces.
1 parent 843124f commit 6e8c5d1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/components/Update.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import screenlinkLogo from "../assets/screenlink.svg";
2+
import screenlinkLogoDark from "../assets/screenlink-dark.svg";
3+
import { useTheme } from "./theme-provider";
24

35
export default function Update({ updateMessage }: { updateMessage: string }) {
6+
const { theme } = useTheme();
47
return (
58
<div className="card items-center justify-center min-h-screen w-screen">
69
<div className="flex min-h-full flex-1 flex-col justify-center px-6 py-12 lg:px-8">
710
<div className="sm:mx-auto sm:w-full sm:max-w-sm">
811
<img
912
className="mx-auto h-10 w-auto"
10-
src={screenlinkLogo}
13+
src={theme === "dark" ? screenlinkLogoDark : screenlinkLogo}
1114
alt="ScreenLink"
1215
/>
1316
<h2 className="mt-10 text-center text-2xl font-bold leading-9 tracking-tight text-gray-300">

0 commit comments

Comments
 (0)