♻️ (TableOptions): reorder imports for better readability
💄 (TableOptions): adjust gap between buttons for better UI spacing 💄 (TableOptions): update icon styles for better visual feedback ✨ (editNodeModal): add dark mode support for badge component ♻️ (editNodeModal): refactor function parameters for consistency 💄 (headerComponent): update icon hover color for better UX consistency
This commit is contained in:
parent
cab1f40b55
commit
2f4ebb290a
3 changed files with 15 additions and 7 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
import { cn } from "../../../../utils/utils";
|
import { cn } from "../../../../utils/utils";
|
||||||
|
import IconComponent from "../../../genericIconComponent";
|
||||||
import ShadTooltip from "../../../shadTooltipComponent";
|
import ShadTooltip from "../../../shadTooltipComponent";
|
||||||
import { Button } from "../../../ui/button";
|
import { Button } from "../../../ui/button";
|
||||||
import IconComponent from "../../../genericIconComponent";
|
|
||||||
|
|
||||||
export default function TableOptions({
|
export default function TableOptions({
|
||||||
resetGrid,
|
resetGrid,
|
||||||
|
|
@ -18,7 +18,7 @@ export default function TableOptions({
|
||||||
}): JSX.Element {
|
}): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<div className={cn("absolute bottom-3 left-6")}>
|
<div className={cn("absolute bottom-3 left-6")}>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-3">
|
||||||
<div>
|
<div>
|
||||||
<ShadTooltip content="Reset Columns">
|
<ShadTooltip content="Reset Columns">
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -31,7 +31,10 @@ export default function TableOptions({
|
||||||
>
|
>
|
||||||
<IconComponent
|
<IconComponent
|
||||||
name="RotateCcw"
|
name="RotateCcw"
|
||||||
className={cn("h-5 w-5 text-primary transition-all")}
|
strokeWidth={2}
|
||||||
|
className={cn(
|
||||||
|
"h-5 w-5 text-primary transition-all hover:text-accent-foreground",
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
</Button>
|
</Button>
|
||||||
</ShadTooltip>
|
</ShadTooltip>
|
||||||
|
|
@ -81,8 +84,8 @@ export default function TableOptions({
|
||||||
<IconComponent
|
<IconComponent
|
||||||
name="Trash2"
|
name="Trash2"
|
||||||
className={cn(
|
className={cn(
|
||||||
"h-5 w-5 text-primary transition-all",
|
"h-5 w-5 text-primary transition-all",
|
||||||
!hasSelection ? "" : "hover:text-destructive",
|
!hasSelection ? "" : "hover:text-status-red ",
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import { forwardRef, useEffect, useRef, useState } from "react";
|
||||||
import IconComponent from "../../components/genericIconComponent";
|
import IconComponent from "../../components/genericIconComponent";
|
||||||
import TableComponent from "../../components/tableComponent";
|
import TableComponent from "../../components/tableComponent";
|
||||||
import { Badge } from "../../components/ui/badge";
|
import { Badge } from "../../components/ui/badge";
|
||||||
|
import { useDarkStore } from "../../stores/darkStore";
|
||||||
import useFlowStore from "../../stores/flowStore";
|
import useFlowStore from "../../stores/flowStore";
|
||||||
import { NodeDataType } from "../../types/flow";
|
import { NodeDataType } from "../../types/flow";
|
||||||
import BaseModal from "../baseModal";
|
import BaseModal from "../baseModal";
|
||||||
|
|
@ -28,6 +29,8 @@ const EditNodeModal = forwardRef(
|
||||||
) => {
|
) => {
|
||||||
const myData = useRef(data);
|
const myData = useRef(data);
|
||||||
|
|
||||||
|
const isDark = useDarkStore((state) => state.dark);
|
||||||
|
|
||||||
const setNode = useFlowStore((state) => state.setNode);
|
const setNode = useFlowStore((state) => state.setNode);
|
||||||
|
|
||||||
function changeAdvanced(n) {
|
function changeAdvanced(n) {
|
||||||
|
|
@ -85,7 +88,9 @@ const EditNodeModal = forwardRef(
|
||||||
</BaseModal.Trigger>
|
</BaseModal.Trigger>
|
||||||
<BaseModal.Header description={data.node?.description!}>
|
<BaseModal.Header description={data.node?.description!}>
|
||||||
<span className="pr-2">{data.type}</span>
|
<span className="pr-2">{data.type}</span>
|
||||||
<Badge variant="secondary">ID: {data.id}</Badge>
|
<Badge variant={isDark ? "gray" : "secondary"}>
|
||||||
|
<span className="relative top-[0.6px]">ID: {data.id}</span>
|
||||||
|
</Badge>
|
||||||
</BaseModal.Header>
|
</BaseModal.Header>
|
||||||
<BaseModal.Content>
|
<BaseModal.Content>
|
||||||
<div className="flex h-full flex-col">
|
<div className="flex h-full flex-col">
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ const HeaderComponent = ({
|
||||||
name="Trash2"
|
name="Trash2"
|
||||||
className={cn(
|
className={cn(
|
||||||
"h-5 w-5 text-primary transition-all",
|
"h-5 w-5 text-primary transition-all",
|
||||||
disableFunctions ? "" : "hover:text-destructive",
|
disableFunctions ? "" : "hover:text-status-red",
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue