mirror of
https://gitee.com/ByteDance/flowgram.ai.git
synced 2025-07-07 17:43:29 +08:00
* chore: add license-header * chore: add precommit * chore: add license header * fix: only js & shell style
16 lines
435 B
TypeScript
16 lines
435 B
TypeScript
/**
|
|
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
import { type FlowNodeEntity } from '@flowgram.ai/fixed-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} />;
|
|
};
|