All files / src/components/ManageMoney/TransactionTable/ExpandedRow_V2 LeftColumnGrid.tsx

100% Statements 2/2
100% Branches 6/6
100% Functions 2/2
100% Lines 2/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44                              4x     13x                                                  
import { Grid, Stack } from "@mui/material";
import { palette } from "@palette";
import React from "react";
import { BaseText } from "./atoms";
 
export function LeftColumnGrid({
  leftColData,
}: {
  leftColData: {
    [key: string]: {
      title: string;
      value: string | JSX.Element;
    };
  };
}) {
  return (
    <Stack gap={1} width="50%" pr={3}>
      {Object.values(leftColData).map((x) => (
        <Grid display="flex" alignItems="center" item key={x.title}>
          <Grid item xs={12} md={3} display="flex" alignItems="center">
            <BaseText value={x.title} width={150} />
          </Grid>
          <Grid item xs={12} md={9} lg={6}>
            {typeof x.value === "object" && x.value !== null ? (
              x.value
            ) : (
              <BaseText
                sx={{
                  ...(x.title === "Transaction ID"
                    ? { "wordBreak": "break-all" }
                    : {}),
                }}
                key={x.title}
                value={x.value}
                color={palette.neutral[800]}
              />
            )}
          </Grid>
        </Grid>
      ))}
    </Stack>
  );
}