@@ -5,8 +5,6 @@ import { ColumnConfiguraton, Table } from '../../components/table'
55import RocketIcon from './rocket-icon'
66import { QueryStatus } from '@tanstack/react-query'
77
8- const MIN_HEIGHT_PX = 500
9-
108export const BreakdownTable = < TListItem extends { name : string } > ( {
119 title,
1210 isPending,
@@ -39,9 +37,9 @@ export const BreakdownTable = <TListItem extends { name: string }>({
3937
4038 return (
4139 < >
42- < div className = "flex justify-between items-center" >
43- < div className = "flex items-center gap-x-2" >
44- < h1 className = "text-lg font-bold dark:text-gray-100" > { title } </ h1 >
40+ < div className = "flex justify-between items-center gap-4 " >
41+ < div className = "flex items-center gap-x-2 shrink-0 " >
42+ < h1 className = "shrink-0 text-base md: text-lg font-bold dark:text-gray-100" > { title } </ h1 >
4543 { ! isPending && isFetching && < SmallLoadingSpinner /> }
4644 </ div >
4745 { ! ! onSearch && (
@@ -54,8 +52,8 @@ export const BreakdownTable = <TListItem extends { name: string }>({
5452 />
5553 ) }
5654 </ div >
57- < div className = "my-4 border-b border-gray-250 dark:border-gray-700" > </ div >
58- < div className = "flex-1 overflow-y- auto pr-3 -mr-3" style = { { minHeight : ` ${ MIN_HEIGHT_PX } px` } } >
55+ < div className = "my-3 md:my- 4 border-b border-gray-250 dark:border-gray-700" > </ div >
56+ < div className = "flex-1 overflow-auto pr-4 -mr-4" >
5957 { displayError && status === 'error' && < ErrorMessage error = { error } /> }
6058 { isPending && < InitialLoadingSpinner /> }
6159 { data && < Table < TListItem > data = { data } columns = { columns } /> }
@@ -73,7 +71,6 @@ export const BreakdownTable = <TListItem extends { name: string }>({
7371const InitialLoadingSpinner = ( ) => (
7472 < div
7573 className = "w-full h-full flex flex-col justify-center"
76- style = { { minHeight : `${ MIN_HEIGHT_PX } px` } }
7774 >
7875 < div className = "mx-auto loading" >
7976 < div />
@@ -90,7 +87,6 @@ const SmallLoadingSpinner = () => (
9087const ErrorMessage = ( { error } : { error ?: unknown } ) => (
9188 < div
9289 className = "grid grid-rows-2 text-gray-700 dark:text-gray-300"
93- style = { { height : `${ MIN_HEIGHT_PX } px` } }
9490 >
9591 < div className = "text-center self-end" >
9692 < RocketIcon />
0 commit comments