File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -17,26 +17,28 @@ class FlowBuilder {
1717 buildNodesArray ( parsedData , x = this . x , y = this . y ) {
1818 if ( ! parsedData ) return ;
1919
20+
2021 parsedData . forEach ( ( item ) => {
2122 const node = {
2223 id : ( ++ this . id ) . toString ( ) ,
23- data : {
24+ data : { // `py-2 px-9 shadow-lg rounded-md border-2 border-gray-500 flex justify-center place-items-center
2425 label : (
25- < div className = { `-mx-2.5 -my-2.5 py-2 px-9 shadow-lg rounded-md border-2 border-gray-500 ${ ( item . isClientComponent ) ? 'bg-orange-300' : 'bg-blue-300' } ` } >
26- < div className = "flex justify-center place-items-center" key = { this . id } >
27- < div className = "text-sm font-medium" > { item . fileName } </ div >
28- </ div >
29- </ div >
26+ < div className = "text-sm font-medium text-ellipsis overflow-hidden ..." key = { this . id } > { item . fileName } </ div >
3027 )
3128 } ,
3229 // type: item.depth === 0 ? 'input' : '',
3330 // type: item.isClientComponent ? 'input' : 'output',
3431 type : 'default' ,
3532 position : { x : x += 40 , y : y += 30 } ,
3633 style : {
37- border : 'none' ,
38- borderRadius : "6px"
39- }
34+ borderRadius : '6px' ,
35+ borderWidth : '2px' ,
36+ borderColor : '#6b7280' ,
37+ display : 'flex' ,
38+ justifyContent : 'center' ,
39+ placeItems : 'center' ,
40+ backgroundColor : `${ ( item . isClientComponent ) ? '#fdba74' : '#93C5FD' } ` ,
41+ } ,
4042 } ;
4143 this . initialNodes . push ( node ) ;
4244 if ( item . children ) {
You can’t perform that action at this time.
0 commit comments