2024-06-15 21:03:59 +05:30
|
|
|
import React, { FC } from 'react';
|
|
|
|
|
import Typography from '@mui/material/Typography';
|
2024-07-31 22:46:38 +05:30
|
|
|
import { WhereWhatPair } from "maxun-core";
|
2024-06-15 21:03:59 +05:30
|
|
|
import styled from "styled-components";
|
|
|
|
|
|
|
|
|
|
interface PairDisplayDivProps {
|
|
|
|
|
index: string;
|
|
|
|
|
pair: WhereWhatPair;
|
|
|
|
|
}
|
|
|
|
|
|
2024-06-15 21:13:35 +05:30
|
|
|
export const PairDisplayDiv: FC<PairDisplayDivProps> = ({ index, pair }) => {
|
2024-06-15 21:03:59 +05:30
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
2024-06-15 21:13:35 +05:30
|
|
|
<Typography sx={{ marginBottom: '10px', marginTop: '25px' }} id="pair-index" variant="h6" component="h2">
|
2024-06-15 21:03:59 +05:30
|
|
|
{`Index: ${index}`}
|
2024-06-15 21:13:35 +05:30
|
|
|
{pair.id ? `, Id: ${pair.id}` : ''}
|
2024-06-15 21:03:59 +05:30
|
|
|
</Typography>
|
|
|
|
|
<Typography id="where-title" variant="h6" component="h2">
|
|
|
|
|
{"Where:"}
|
|
|
|
|
</Typography>
|
|
|
|
|
<DescriptionWrapper id="where-description">
|
|
|
|
|
<pre>{JSON.stringify(pair?.where, undefined, 2)}</pre>
|
|
|
|
|
</DescriptionWrapper>
|
|
|
|
|
<Typography id="what-title" variant="h6" component="h2">
|
|
|
|
|
{"What:"}
|
|
|
|
|
</Typography>
|
|
|
|
|
<DescriptionWrapper id="what-description">
|
2024-06-15 21:13:35 +05:30
|
|
|
<pre>{JSON.stringify(pair?.what, undefined, 2)}</pre>
|
2024-06-15 21:03:59 +05:30
|
|
|
</DescriptionWrapper>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const DescriptionWrapper = styled.div`
|
|
|
|
|
margin: 0;
|
|
|
|
|
font-family: "Roboto","Helvetica","Arial",sans-serif;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-size: 1rem;
|
|
|
|
|
line-height: 1.5;
|
|
|
|
|
letter-spacing: 0.00938em;
|
|
|
|
|
`;
|