import React from 'react';
import { Stack, Typography, Box } from '@mui/material';

const TitleCard = ({ sx, title, children, starticon }) => {
  return (
    <Box
      sx={{
        ...sx
      }}
    >
      <Stack direction="row" flexWrap={'wrap'} alignItems="center" justifyContent="space-between" gap={1}>
        <Stack>
          {starticon && starticon}
          <Typography variant="h3">{title}</Typography>
        </Stack>
        {children}
      </Stack>
    </Box>
  );
};

export default TitleCard;
