Changing edge colors dark mode

This commit is contained in:
Cristhian Zanforlin Lousa 2023-05-29 23:45:02 -03:00
commit 9f27a3e1cc
6 changed files with 21 additions and 13 deletions

View file

@ -174,7 +174,7 @@ export default function GenericNode({
validationStatus && validationStatus.valid
? "w-4 h-4 rounded-full bg-green-500 opacity-100"
: "w-4 h-4 rounded-full bg-gray-500 opacity-0 hidden animate-spin",
"absolute w-4 hover:text-gray-500 hover:dark:text-gray-300 transition-all ease-in-out duration-200"
"absolute w-4 hover:text-gray-500 hover:dark:text-gray-300 transition-all ease-in-out duration-200"
)}
></div>
<div
@ -182,7 +182,7 @@ export default function GenericNode({
validationStatus && !validationStatus.valid
? "w-4 h-4 rounded-full bg-yellow-500 opacity-100"
: "w-4 h-4 rounded-full bg-gray-500 opacity-0 hidden animate-spin",
"absolute w-4 hover:text-gray-500 hover:dark:text-gray-300 transition-all ease-in-out duration-200"
"absolute w-4 hover:text-gray-500 hover:dark:text-gray-300 transition-all ease-in-out duration-200"
)}
></div>
<div
@ -190,13 +190,12 @@ export default function GenericNode({
!validationStatus
? "w-4 h-4 rounded-full bg-red-500 opacity-100"
: "w-4 h-4 rounded-full bg-gray-500 opacity-0 hidden animate-spin",
"absolute w-4 hover:text-gray-500 hover:dark:text-gray-300 transition-all ease-in-out duration-200"
"absolute w-4 hover:text-gray-500 hover:dark:text-gray-300 transition-all ease-in-out duration-200"
)}
></div>
</div>
</Tooltip>
</div>
</div>
</div>

View file

@ -15,7 +15,11 @@ export default function FloatComponent({
}
}, [disabled, onChange]);
return (
<div className={"w-full " + (disabled ? "pointer-events-none cursor-not-allowed" : "")}>
<div
className={
"w-full " + (disabled ? "pointer-events-none cursor-not-allowed" : "")
}
>
<input
type="number"
value={myValue}

View file

@ -16,9 +16,10 @@ export default function IntComponent({
}, [disabled, onChange]);
return (
<div
className={"w-full " + (
disabled ? "pointer-events-none cursor-not-allowed w-full" : "w-full"
)}
className={
"w-full " +
(disabled ? "pointer-events-none cursor-not-allowed w-full" : "w-full")
}
>
<input
onKeyDown={(event) => {

View file

@ -89,7 +89,7 @@ export function TabsProvider({ children }: { children: ReactNode }) {
cookieObject.flows.forEach((flow) => {
flow.data.edges.forEach((edge) => {
edge.className = "";
edge.style = { stroke: "#222222" };
edge.style = { stroke: "#555555" };
});
flow.data.nodes.forEach((node) => {
if (Object.keys(templates[node.data.type]["template"]).length > 0) {
@ -295,7 +295,7 @@ export function TabsProvider({ children }: { children: ReactNode }) {
if (data) {
data.edges.forEach((edge) => {
edge.className = "";
edge.style = { stroke: "#222222" };
edge.style = { stroke: "#555555" };
});
data.nodes.forEach((node) => {
if (Object.keys(templates[node.data.type]["template"]).length > 0) {

View file

@ -15,7 +15,9 @@ export default function ExtraSidebar() {
) {
//start drag event
var crt = event.currentTarget.cloneNode(true);
crt.style.position = "absolute"; crt.style.top = "-500px"; crt.style.right = "-500px";
crt.style.position = "absolute";
crt.style.top = "-500px";
crt.style.right = "-500px";
crt.classList.add("cursor-grabbing");
document.body.appendChild(crt);
event.dataTransfer.setDragImage(crt, 0, 0);
@ -60,7 +62,9 @@ export default function ExtraSidebar() {
}
onDragEnd={() => {
document.body.removeChild(
document.getElementsByClassName("cursor-grabbing")[0]
document.getElementsByClassName(
"cursor-grabbing"
)[0]
);
}}
>

View file

@ -154,7 +154,7 @@ export default function FlowPage({ flow }: { flow: FlowType }) {
style:
params.targetHandle.split("|")[0] === "Text"
? { stroke: "#333333", strokeWidth: 2 }
: { stroke: "#222222" },
: { stroke: "#555555" },
animated: params.targetHandle.split("|")[0] === "Text",
},
eds