Skip to content

Commit

Permalink
update some shared components
Browse files Browse the repository at this point in the history
  • Loading branch information
wbglaeser committed Dec 30, 2024
1 parent 250482a commit 35c5a67
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/ui/shared-components/ContentBox.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// src/components/WrapperBox.jsx
import React from 'react';
import { Box } from '@mui/material';
import { styled } from '@mui/system';

const ContentBoxStyled = styled(Box)(({ theme }) => ({
backgroundColor: theme.palette.custom.lightGreyTransparent,
borderRadius: theme.shape.borderRadius,
padding: theme.spacing(2),
}));

const ContentBox = ({ children, sx, ...props }) => {
return (
<ContentBoxStyled sx={sx} {...props}>
{children}
</ContentBoxStyled>
);
};

export default ContentBox;
15 changes: 15 additions & 0 deletions src/ui/shared-components/LayoutBoxes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Box } from '@mui/material';
import { styled } from '@mui/system';

export const HBox = styled(Box)(({ theme, gap = 2 }) => ({
display: 'flex',
flexDirection: 'row',
gap: theme.spacing(gap),
}));

export const VBox = styled(Box)(({ theme, gap = 1, alignItems = 'center' }) => ({
display: 'flex',
flexDirection: 'column',
alignItems,
gap: theme.spacing(gap),
}));

0 comments on commit 35c5a67

Please sign in to comment.