Skip to content

Commit

Permalink
Fix: val modal scale (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickimoore committed Aug 22, 2023
1 parent d36ea61 commit fe7742c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 17 deletions.
14 changes: 12 additions & 2 deletions src/components/DiagnosticTable/AlertInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const AlertInfo = () => {
const { t } = useTranslation()
const { alerts, dismissAlert, resetDismissed } = useDiagnosticAlerts()
const { ref, dimensions } = useDivDimensions()
const headerDimensions = useDivDimensions()
const [filter, setFilter] = useState('all')

const setFilterValue = (value: FilterValue) => setFilter(value)
Expand Down Expand Up @@ -40,15 +41,24 @@ const AlertInfo = () => {

return (
<div ref={ref} className='h-full w-full flex flex-col md:border-l-0 border-t-0 border-style500'>
<div className='w-full h-12 flex items-center justify-between px-4 border-l-0 border-r-0 border-style500'>
<div
ref={headerDimensions.ref}
className='w-full h-12 flex items-center justify-between px-4 border-l-0 border-r-0 border-style500'
>
<Typography type='text-caption1' color='text-primary' darkMode='dark:text-white' isBold>
{t('alertInfo.alerts')}
</Typography>
<AlertFilterSettings value={filter as FilterValue} onChange={setFilterValue} />
</div>
{dimensions && (
<div
style={isMobile ? undefined : { maxHeight: `${dimensions.height}px` }}
style={
isMobile
? undefined
: {
maxHeight: `${dimensions.height - (headerDimensions?.dimensions?.height || 0)}px`,
}
}
className='h-full w-full flex flex-col'
>
{formattedAlerts.length > 0 && (
Expand Down
30 changes: 15 additions & 15 deletions src/components/ValidatorDetailTable/ValidatorDetailTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,77 +99,77 @@ export const ValidatorDetailTable: FC<ValidatorDetailTableProps> = ({ validator
</div>
<div className='hidden lg:block border-t-style100 w-full'>
<div className='w-full flex'>
<div className='w-20 py-4 px-6'>
<div className='w-20 @1600:w-28 py-4 px-6'>
<Typography type='text-caption2' color='text-dark500' isBold isUpperCase>
{t('balance')}
</Typography>
</div>
<div className='w-20 py-4 px-6'>
<div className='w-20 @1600:w-28 py-4 px-6'>
<Typography type='text-caption2' color='text-dark500' isBold isUpperCase>
{t('income')}
</Typography>
</div>
<div className='w-20 py-4 px-6'>
<div className='w-20 @1600:w-28 py-4 px-6'>
<Typography type='text-caption2' color='text-dark500' isBold isUpperCase>
{t('proposed')}
</Typography>
</div>
<div className='w-20 py-4 px-6'>
<div className='w-20 @1600:w-28 py-4 px-6'>
<Typography type='text-caption2' color='text-dark500' isBold isUpperCase>
{t('attested')}
</Typography>
</div>
<div className='w-20 py-4 px-6'>
<div className='w-20 @1600:w-28 py-4 px-6'>
<Typography type='text-caption2' color='text-dark500' isBold isUpperCase>
{t('aggregated')}
</Typography>
</div>
<div className='w-12 py-4 px-6'>
<div className='w-12 @1600:w-20 py-4 px-6'>
<Typography type='text-caption2' color='text-dark500' isBold isUpperCase>
{t('in')}
</Typography>
</div>
<div className='w-24 py-4 px-6'>
<div className='w-24 @1600:w-32 py-4 px-6'>
<Typography type='text-caption2' color='text-dark500' isBold isUpperCase>
{t('effectiveness')}
</Typography>
</div>
<div className='w-20 py-4 px-6'>
<div className='w-20 @1600:w-28 py-4 px-6'>
<Typography type='text-caption2' color='text-dark500' isBold isUpperCase>
Apr
</Typography>
</div>
</div>
<div className='border-t-style100 w-full flex'>
<div className='w-20 py-4 px-6'>
<div className='w-20 @1600:w-28 py-4 px-6'>
<Typography type='text-caption1'>{balance?.toFixed(4)}</Typography>
</div>
<div className='w-20 py-4 px-6'>
<div className='w-20 @1600:w-28 py-4 px-6'>
<Typography type='text-caption1' color={incomeColor} darkMode={incomeColor}>
{income.toFixed(4)}
</Typography>
</div>
<div className='w-20 py-4 px-6 opacity-20'>
<div className='w-20 @1600:w-28 py-4 px-6 opacity-20'>
<Typography color='text-dark400' type='text-caption1'>
-
</Typography>
</div>
<div className='w-20 py-4 px-6 opacity-20'>
<div className='w-20 @1600:w-28 py-4 px-6 opacity-20'>
<Typography color='text-dark400' type='text-caption1'>
-
</Typography>
</div>
<div className='w-20 py-4 px-6 opacity-20'>
<div className='w-20 @1600:w-28 py-4 px-6 opacity-20'>
<Typography color='text-dark400' type='text-caption1'>
-
</Typography>
</div>
<div className='w-12 py-4 px-6 opacity-20'>
<div className='w-12 @1600:w-20 py-4 px-6 opacity-20'>
<Typography color='text-dark400' type='text-caption1'>
-
</Typography>
</div>
<div className='w-24 py-4 px-6 opacity-20'>
<div className='w-24 @1600:w-32 py-4 px-6 opacity-20'>
<Typography color='text-dark400' type='text-caption1'>
-
</Typography>
Expand Down

0 comments on commit fe7742c

Please sign in to comment.