balibabu
commited on
Commit
·
b797251
1
Parent(s):
6f14aae
Feat: Set the color of the canvas's control button #3851 (#4053)
Browse files### What problem does this PR solve?
Feat: Set the color of the canvas's control button #3851
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
web/src/components/theme-provider.tsx
CHANGED
|
@@ -58,3 +58,9 @@ export const useTheme = () => {
|
|
| 58 |
|
| 59 |
return context;
|
| 60 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
return context;
|
| 60 |
};
|
| 61 |
+
|
| 62 |
+
export const useIsDarkTheme = () => {
|
| 63 |
+
const { theme } = useTheme();
|
| 64 |
+
|
| 65 |
+
return theme === 'dark';
|
| 66 |
+
};
|
web/src/pages/flow/canvas/index.tsx
CHANGED
|
@@ -103,6 +103,8 @@ function FlowCanvas({ drawerVisible, hideDrawer }: IProps) {
|
|
| 103 |
hideSingleDebugDrawer,
|
| 104 |
} = useShowSingleDebugDrawer();
|
| 105 |
|
|
|
|
|
|
|
| 106 |
const { formDrawerVisible, hideFormDrawer, showFormDrawer, clickedNode } =
|
| 107 |
useShowFormDrawer();
|
| 108 |
|
|
@@ -229,7 +231,7 @@ function FlowCanvas({ drawerVisible, hideDrawer }: IProps) {
|
|
| 229 |
<TooltipProvider>
|
| 230 |
<Tooltip>
|
| 231 |
<TooltipTrigger asChild>
|
| 232 |
-
<FolderInput />
|
| 233 |
</TooltipTrigger>
|
| 234 |
<TooltipContent>Import</TooltipContent>
|
| 235 |
</Tooltip>
|
|
@@ -239,7 +241,7 @@ function FlowCanvas({ drawerVisible, hideDrawer }: IProps) {
|
|
| 239 |
<TooltipProvider>
|
| 240 |
<Tooltip>
|
| 241 |
<TooltipTrigger asChild>
|
| 242 |
-
<FolderOutput />
|
| 243 |
</TooltipTrigger>
|
| 244 |
<TooltipContent>Export</TooltipContent>
|
| 245 |
</Tooltip>
|
|
|
|
| 103 |
hideSingleDebugDrawer,
|
| 104 |
} = useShowSingleDebugDrawer();
|
| 105 |
|
| 106 |
+
const controlIconClassname = 'text-black';
|
| 107 |
+
|
| 108 |
const { formDrawerVisible, hideFormDrawer, showFormDrawer, clickedNode } =
|
| 109 |
useShowFormDrawer();
|
| 110 |
|
|
|
|
| 231 |
<TooltipProvider>
|
| 232 |
<Tooltip>
|
| 233 |
<TooltipTrigger asChild>
|
| 234 |
+
<FolderInput className={controlIconClassname} />
|
| 235 |
</TooltipTrigger>
|
| 236 |
<TooltipContent>Import</TooltipContent>
|
| 237 |
</Tooltip>
|
|
|
|
| 241 |
<TooltipProvider>
|
| 242 |
<Tooltip>
|
| 243 |
<TooltipTrigger asChild>
|
| 244 |
+
<FolderOutput className={controlIconClassname} />
|
| 245 |
</TooltipTrigger>
|
| 246 |
<TooltipContent>Export</TooltipContent>
|
| 247 |
</Tooltip>
|