github.com/voedger/voedger@v0.0.0-20240520144910-273e84102129/pkg/apps/sys.monitor/site.main.src/src/elements/MonCard.js (about)

     1  /*
     2   * Copyright (c) 2022-present unTill Pro, Ltd.
     3   */
     4  
     5  import * as React from "react";
     6  import CardContent from '@mui/material/CardContent';
     7  import { Card, Box, Typography } from '@mui/material';
     8  
     9  export default (props) => {
    10  
    11      if (props.noframe) {
    12          return (
    13              <Box>
    14                  <Box display="flex">
    15                      <Box width={'100%'} paddingBottom={1}>
    16                          <Typography variant="h6" component="h2">
    17                              {props.caption}
    18                          </Typography>
    19                      </Box>
    20                      <Box>
    21                          {props.toolbar}
    22                      </Box>
    23                  </Box>
    24                  {props.children}
    25              </Box>    
    26          )
    27      }
    28  
    29      return (
    30          <Box sx={{ p: 2.2 }}>
    31              <Card >
    32                  <CardContent>
    33                      <Box display="flex">
    34                          <Box width={'100%'} paddingBottom={1}>
    35                              <Typography variant="h5" component="h2"  >
    36                                  {props.caption}
    37                              </Typography>
    38                          </Box>
    39                          <Box>
    40                              {props.toolbar}
    41                          </Box>
    42                      </Box>
    43                      {props.children}
    44                  </CardContent>
    45              </Card>
    46          </Box>
    47      )
    48  };