chore: import clean Agent Desk snapshot (1/7)
This commit is contained in:
15
flowgram-editor/src/form-components/form-header/utils.tsx
Normal file
15
flowgram-editor/src/form-components/form-header/utils.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
import { type FlowNodeEntity } from '@flowgram.ai/free-layout-editor';
|
||||
|
||||
import { FlowNodeRegistry } from '../../typings';
|
||||
import { Icon } from './styles';
|
||||
|
||||
export const getIcon = (node: FlowNodeEntity) => {
|
||||
const icon = node.getNodeRegistry<FlowNodeRegistry>().info?.icon;
|
||||
if (!icon) return null;
|
||||
return <Icon src={icon} />;
|
||||
};
|
||||
Reference in New Issue
Block a user