feat: Add dark mode support to JigsawStackIcon (#9013)

* ✨ (JigsawStack/index.tsx): introduce useDarkStore hook to handle dark mode state in JigsawStackIcon component

* 🐛 (JigsawStackIcon.jsx): fix issue where isdark prop was not being converted to a boolean before being used in the fill color logic
This commit is contained in:
Cristhian Zanforlin Lousa 2025-07-11 17:17:17 -03:00 • committed by GitHub
commit f860d94123
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -9,7 +9,7 @@ const JigsawStackIconSVG = ({ isdark, ...props }) => (
> >
<path <path
fill={ fill={
isdark stringToBool(isdark)
? "url(#paint0_linear_102_21_dark)" ? "url(#paint0_linear_102_21_dark)"
: "url(#paint0_linear_102_21)" : "url(#paint0_linear_102_21)"
} }

View file

@ -1,3 +1,4 @@
import { useDarkStore } from "@/stores/darkStore";
import React, { forwardRef } from "react"; import React, { forwardRef } from "react";
import JigsawStackIconSVG from "./JigsawStackIcon"; import JigsawStackIconSVG from "./JigsawStackIcon";
@ -5,5 +6,6 @@ export const JigsawStackIcon = forwardRef<
SVGSVGElement, SVGSVGElement,
React.PropsWithChildren<{}> React.PropsWithChildren<{}>
>((props, ref) => { >((props, ref) => {
return <JigsawStackIconSVG ref={ref} {...props} />; const isdark = useDarkStore((state) => state.dark).toString();
return <JigsawStackIconSVG ref={ref} {...props} isdark={isdark} />;
}); });