mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +00:00
refactor(FE): Format PdfTfoot props and inline Text
This commit is contained in:
@@ -75,7 +75,11 @@ interface PdfTfootProps {
|
|||||||
label?: string;
|
label?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const PdfTfoot = ({ columns, cells, label = 'Total' }: PdfTfootProps) => {
|
export const PdfTfoot = ({
|
||||||
|
columns,
|
||||||
|
cells,
|
||||||
|
label = 'Total',
|
||||||
|
}: PdfTfootProps) => {
|
||||||
return (
|
return (
|
||||||
<View style={[styles.tableRow, styles.summaryRow]}>
|
<View style={[styles.tableRow, styles.summaryRow]}>
|
||||||
{columns.map((column, index) => {
|
{columns.map((column, index) => {
|
||||||
@@ -113,9 +117,7 @@ export const PdfTfoot = ({ columns, cells, label = 'Total' }: PdfTfootProps) =>
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<View key={column.key} style={cellStyle}>
|
<View key={column.key} style={cellStyle}>
|
||||||
<Text>
|
<Text>{column.key === 'no' ? label : cellData?.value || ''}</Text>
|
||||||
{column.key === 'no' ? label : cellData?.value || ''}
|
|
||||||
</Text>
|
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
Reference in New Issue
Block a user