File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
packages/x-flow/src/components/PanelContainer Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ const Panel: FC<IPanelProps> = (props: IPanelProps) => {
39
39
const isDisabled = [ 'Input' , 'Output' ] . includes ( nodeType ) || disabled ;
40
40
const [ descVal , setDescVal ] = useState ( data ?. desc ) ;
41
41
const [ titleVal , setTitleVal ] = useState ( data ?. title || nodeSetting ?. title ) ;
42
- const { hideDesc, nodeConfigPanelWidth } = nodeSetting ;
42
+ const { hideDesc, nodeConfigPanelWidth, iconSvg } = nodeSetting ;
43
43
44
44
// const description = getDescription(nodeType, props.description);
45
45
const handleNodeValueChange = debounce ( ( data : any ) => {
@@ -82,12 +82,16 @@ const Panel: FC<IPanelProps> = (props: IPanelProps) => {
82
82
< div style = { { display : 'flex' , alignItems : 'center' , flex : 1 } } >
83
83
< span
84
84
className = "icon-box"
85
- style = { { background : nodeSetting ?. icon ?. bgColor } }
85
+ style = { { background : nodeSetting ?. icon ?. bgColor || '#F79009' } }
86
86
>
87
- < Icon
88
- style = { { fontSize : 14 , color : '#fff' } }
89
- type = { nodeSetting ?. icon ?. type }
90
- />
87
+ { iconSvg ? (
88
+ iconSvg
89
+ ) : (
90
+ < Icon
91
+ style = { { fontSize : 14 , color : '#fff' } }
92
+ type = { nodeSetting ?. icon ?. type }
93
+ />
94
+ ) }
91
95
</ span >
92
96
{ isDisabled ? (
93
97
< span style = { { marginLeft : '11px' } } > { nodeSetting ?. title } </ span >
You can’t perform that action at this time.
0 commit comments