File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed
Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -17,26 +17,33 @@ 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={`${(item.isClientComponent) ? 'bg-orange-300' : 'bg-blue-300'}`} key={this.id}>
27+ < div className = "text-sm font-medium" key = { this . id } > { item . fileName } </ div >
28+ // {/* <div className="flex justify-center place-items-center" key={this.id}> */ }
29+ // {/* <div className="text-sm font-medium">{item.fileName}</div> */ }
30+ // {/* </div> */}
31+ // // </div>
3032 )
3133 } ,
3234 // type: item.depth === 0 ? 'input' : '',
3335 // type: item.isClientComponent ? 'input' : 'output',
3436 type : 'default' ,
3537 position : { x : x += 40 , y : y += 30 } ,
3638 style : {
37- border : 'none' ,
38- borderRadius : "6px"
39- }
39+ borderRadius : '6px' ,
40+ borderWidth : '2px' ,
41+ borderColor : '#6b7280' ,
42+ display : 'flex' ,
43+ justifyContent : 'center' ,
44+ placeItems : 'center' ,
45+ backgroundColor : `${ ( item . isClientComponent ) ? '#fdba74' : '#93C5FD' } ` ,
46+ } ,
4047 } ;
4148 this . initialNodes . push ( node ) ;
4249 if ( item . children ) {
You can’t perform that action at this time.
0 commit comments