|
@@ -1,19 +1,39 @@
|
|
-import Typography from '@mui/material/Typography';
|
|
|
|
import { useTranslation } from 'react-i18next';
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
+import { ReactNode } from 'react';
|
|
|
|
|
|
export const getLabelDisplayedRows =
|
|
export const getLabelDisplayedRows =
|
|
- (itemName: string = 'rows', info: string = '') =>
|
|
|
|
|
|
+ (itemName: string = 'rows', info: string | ReactNode = '') =>
|
|
({ from = 0, to = 0, count = 0 }) => {
|
|
({ from = 0, to = 0, count = 0 }) => {
|
|
const { t: commonTrans } = useTranslation();
|
|
const { t: commonTrans } = useTranslation();
|
|
|
|
|
|
return (
|
|
return (
|
|
- <>
|
|
|
|
- <Typography variant="body2" component="span">
|
|
|
|
- {from} - {to}
|
|
|
|
- </Typography>
|
|
|
|
- <Typography variant="body2" className="rows" component="span">
|
|
|
|
- {commonTrans('grid.of')} {count} {itemName} {info}
|
|
|
|
- </Typography>
|
|
|
|
- </>
|
|
|
|
|
|
+ <div
|
|
|
|
+ style={{
|
|
|
|
+ display: 'flex',
|
|
|
|
+ alignItems: 'center',
|
|
|
|
+ gap: '4px',
|
|
|
|
+ fontSize: '0.75rem',
|
|
|
|
+ lineHeight: 1,
|
|
|
|
+ height: '20px',
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ <span style={{ fontSize: 'inherit' }}>
|
|
|
|
+ {from} - {to}
|
|
|
|
+ </span>
|
|
|
|
+ <span style={{ fontSize: 'inherit' }}>
|
|
|
|
+ {commonTrans('grid.of')} {count} {itemName}
|
|
|
|
+ </span>
|
|
|
|
+ {info && (
|
|
|
|
+ <span
|
|
|
|
+ style={{
|
|
|
|
+ fontSize: 'inherit',
|
|
|
|
+ display: 'flex',
|
|
|
|
+ alignItems: 'center',
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ {info}
|
|
|
|
+ </span>
|
|
|
|
+ )}
|
|
|
|
+ </div>
|
|
);
|
|
);
|
|
};
|
|
};
|