Skip to content

Commit

Permalink
Feat: Set the color of the canvas's control button infiniflow#3851 (i…
Browse files Browse the repository at this point in the history
…nfiniflow#4053)

### What problem does this PR solve?

Feat: Set the color of the canvas's control button infiniflow#3851

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
  • Loading branch information
cike8899 authored and learnerLj committed Dec 19, 2024
1 parent f003100 commit 080903d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions web/src/components/theme-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,9 @@ export const useTheme = () => {

return context;
};

export const useIsDarkTheme = () => {
const { theme } = useTheme();

return theme === 'dark';
};
6 changes: 4 additions & 2 deletions web/src/pages/flow/canvas/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ function FlowCanvas({ drawerVisible, hideDrawer }: IProps) {
hideSingleDebugDrawer,
} = useShowSingleDebugDrawer();

const controlIconClassname = 'text-black';

const { formDrawerVisible, hideFormDrawer, showFormDrawer, clickedNode } =
useShowFormDrawer();

Expand Down Expand Up @@ -229,7 +231,7 @@ function FlowCanvas({ drawerVisible, hideDrawer }: IProps) {
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<FolderInput />
<FolderInput className={controlIconClassname} />
</TooltipTrigger>
<TooltipContent>Import</TooltipContent>
</Tooltip>
Expand All @@ -239,7 +241,7 @@ function FlowCanvas({ drawerVisible, hideDrawer }: IProps) {
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<FolderOutput />
<FolderOutput className={controlIconClassname} />
</TooltipTrigger>
<TooltipContent>Export</TooltipContent>
</Tooltip>
Expand Down

0 comments on commit 080903d

Please sign in to comment.