feat: add NvidiaIcon component to support dark mode (#4994)

*  (Nvidia): Add support for dark mode in Nvidia icon by using useDarkStore hook to determine fill color based on dark mode state

* ♻️ (index.tsx): remove unnecessary console.log statement from CustomInputPopover component
This commit is contained in:
Cristhian Zanforlin Lousa 2024-12-02 13:17:39 -03:00 committed by GitHub
commit 4b5c956dbe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View file

@ -62,8 +62,6 @@ const CustomInputPopover = ({
}
};
console.log(placeholder, value, id);
return (
<Popover modal open={showOptions} onOpenChange={setShowOptions}>
<PopoverAnchor>

View file

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

View file

@ -16,6 +16,7 @@ const NvidiaSVG = (props) => (
</title>
<path
id="path17"
fill={props.isdark ? "#fff" : "#000"}
d="M384.195,282.109c0,3.771-2.769,6.302-6.047,6.302v-0.023c-3.371,0.023-6.089-2.508-6.089-6.278
c0-3.769,2.718-6.293,6.089-6.293C381.427,275.816,384.195,278.34,384.195,282.109z M386.648,282.109c0-5.175-4.02-8.179-8.5-8.179
c-4.511,0-8.531,3.004-8.531,8.179c0,5.172,4.021,8.188,8.531,8.188C382.629,290.297,386.648,287.281,386.648,282.109
@ -24,6 +25,7 @@ const NvidiaSVG = (props) => (
/>
<path
id="path19"
fill={props.isdark ? "#fff" : "#000"}
d="M329.406,237.027l10.598,28.993H318.48L329.406,237.027z M318.056,225.738l-24.423,61.88h17.246l3.863-10.934
h28.903l3.656,10.934h18.722l-24.605-61.888L318.056,225.738z M269.023,287.641h17.497v-61.922l-17.5-0.004L269.023,287.641z
M147.556,225.715l-14.598,49.078l-13.984-49.074l-18.879-0.004l19.972,61.926h25.207l20.133-61.926H147.556z M218.281,239.199h7.52

View file

@ -56,8 +56,6 @@ test(
.getByTestId("textarea_str_url")
.fill("https://www.youtube.com/watch?v=VqhCQZaH4Vs");
await page.getByTestId("textarea_str_language").fill("en");
await page.getByTestId("button_run_youtube transcripts").click();
await page.waitForSelector("text=built successfully", { timeout: 30000 });