e5f41731ae
* bootstrap next app + add overview page * fix AssetList type * fix up nav stuff * Refactor Nav component and add network components pages * Refactor WorldMap component and update TelegramIcon, GitHubIcon, NymVpnIcon, DiscordIcon, and TwitterIcon components * add service providers page * mixnodes page * delegations page + use material react table for all tables * nodes map page * Refactor StyledLink component and remove unnecessary console.log statements * Refactor ESLint configuration, remove unused dependencies, and update component imports * update deps * Refactor imports and update dependencies * fix dark mode * build single mixnode page * build single gateway page * Refactor handleOnDelegate function to use useCallback in mixnodes page.tsx * Add defaults for constants --------- Co-authored-by: Mark Sinclair <mmsinclair@users.noreply.github.com>
33 lines
1.0 KiB
TypeScript
33 lines
1.0 KiB
TypeScript
import React from 'react';
|
|
import { Box, Stack, SxProps, Typography, TypographyProps } from '@mui/material';
|
|
import { ModalDivider } from './ModalDivider';
|
|
|
|
export const ModalListItem: FCWithChildren<{
|
|
label: string;
|
|
divider?: boolean;
|
|
hidden?: boolean;
|
|
fontWeight?: TypographyProps['fontWeight'];
|
|
fontSize?: TypographyProps['fontSize'];
|
|
light?: boolean;
|
|
value?: React.ReactNode;
|
|
sxValue?: SxProps;
|
|
}> = ({ label, value, hidden, fontWeight, fontSize, divider, sxValue }) => (
|
|
<Box sx={{ display: hidden ? 'none' : 'block' }}>
|
|
<Stack direction="row" justifyContent="space-between" alignItems="center">
|
|
<Typography fontSize="smaller" fontWeight={fontWeight} sx={{ color: 'text.primary', fontSize: 14 }}>
|
|
{label}
|
|
</Typography>
|
|
{value && (
|
|
<Typography
|
|
fontSize="smaller"
|
|
fontWeight={fontWeight}
|
|
sx={{ color: 'text.primary', fontSize: fontSize || 14, ...sxValue }}
|
|
>
|
|
{value}
|
|
</Typography>
|
|
)}
|
|
</Stack>
|
|
{divider && <ModalDivider />}
|
|
</Box>
|
|
);
|