11import { Stack , Box , Button , Text , px , Code } from '@mantine/core' ;
22import { IconClock , IconEye , IconEyeOff , IconTrash , IconX } from '@tabler/icons-react' ;
3- import { useState , useCallback , Fragment , FC } from 'react' ;
3+ import { useState , useCallback , FC } from 'react' ;
44import classes from '../styles/SavedCorrelationItem.module.css' ;
55import { Correlation } from '@/@types/parseable/api/correlation' ;
66import dayjs from 'dayjs' ;
@@ -51,14 +51,13 @@ const SelectedFields: FC<{ tableConfigs: TableConfig[] }> = ({ tableConfigs }) =
5151 ) ;
5252
5353 return (
54- < div className = "space-x-1" >
55- < span style = { { fontSize : '11px' } } > Selected Fields: </ span >
56- { fields . map ( ( field , index ) => (
57- < Fragment key = { field . key } >
54+ < div >
55+ < div style = { { fontSize : '11px' } } > Selected Fields: </ div >
56+ < div style = { { display : 'flex' , gap : '5px' , flexWrap : 'wrap' , marginTop : '5px' } } >
57+ { fields . map ( ( field ) => (
5858 < Code > { field . content } </ Code >
59- { index < fields . length - 1 && < span > ,</ span > }
60- </ Fragment >
61- ) ) }
59+ ) ) }
60+ </ div >
6261 </ div >
6362 ) ;
6463} ;
@@ -73,8 +72,8 @@ const JoinConditions: FC<{ joinConfig: JoinConfig }> = ({ joinConfig }) => {
7372 if ( ! nextJoin ) return null ;
7473
7574 return (
76- < div key = { `join-${ index } ` } className = "space-x-1" >
77- < span style = { { fontSize : '11px' } } > Join Condition:</ span >
75+ < div key = { `join-${ index } ` } >
76+ < div style = { { fontSize : '11px' } } > Join Condition:</ div >
7877 < Code > { `${ join . tableName } .${ join . field } ` } </ Code >
7978 < span > =</ span >
8079 < Code > { `${ nextJoin . tableName } .${ nextJoin . field } ` } </ Code >
@@ -154,7 +153,7 @@ const SavedCorrelationItem = (props: { item: Correlation }) => {
154153 </ Stack >
155154 </ Stack >
156155 { showQuery && (
157- < Stack gap = { 0 } >
156+ < Stack gap = { 10 } >
158157 < SelectedFields tableConfigs = { tableConfigs } />
159158 < JoinConditions joinConfig = { joinConfig } />
160159 </ Stack >
0 commit comments