Refactored the code and addressed the comments.

This commit is contained in:
M M committed 2024-05-21 16:38:11 -07:00
1 parent 5ec8c70176
commit aa000bda8b
1 file changed
+41 -9
+41 -9
View File
@@ -1,22 +1,54 @@
import { Box, Button, Typography } from '@mui/material'; import { Box, Typography, useTheme } from '@mui/material';
import Button from '../Button';
/**
* Integrations component
* @returns {JSX.Element}
*/
const Integrations = () => { const Integrations = () => {
return ( const theme = useTheme();
<Box display="flex" alignItems="center" p={2} border={1} borderRadius={2}>
<Box component="img" src="https://via.placeholder.com/100" alt="Placeholder" width={100} height={100} />
<Box flex={1} mx={2} display="flex" flexDirection="column" alignItems="flex-start"> return (
<Box
display="flex"
alignItems="center"
p={theme.spacing(2)}
border={1}
borderColor={theme.palette.divider}
borderRadius={theme.shape.borderRadius}
>
<Box
component="img"
src="https://via.placeholder.com/100"
alt="Placeholder"
width={100}
height={100}
/>
<Box
flex={1}
mx={theme.spacing(2)}
display="flex"
flexDirection="column"
alignItems="flex-start"
>
<Typography variant="h6" component="div"> <Typography variant="h6" component="div">
Header Header
</Typography> </Typography>
<Typography variant="body1" component="div" sx={{ maxWidth: '300px', wordWrap: 'break-word', textAlign: 'left' }}> <Typography
variant="body1"
component="div"
sx={{
maxWidth: '300px',
wordWrap: 'break-word',
textAlign: 'left'
}}
>
This is a paragraph that provides more detail about the header. This is a paragraph that provides more detail about the header.
</Typography> </Typography>
</Box> </Box>
<Button variant="contained" color="primary" sx={{ minWidth: '120px', minHeight: '45px' }}> <Button label="Click Me" level="primary" />
Click Me
</Button>
</Box> </Box>
); );
}; };