Skip to content

Commit

Permalink
Container for holding buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
jduffey committed Apr 27, 2024
1 parent df2345e commit a01c994
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
37 changes: 37 additions & 0 deletions src/components/manage-funds/ButtonContainer.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react';
import { Box } from '@mui/material';
import DepositEthButton from './DepositEthButton';
import WithdrawEthButton from './WithdrawEthButton';

const Container = ({ children }) => {
return (
<Box
sx={{
display: 'inline-flex',
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#D9D9D9',
borderRadius: '20px',
padding: '30px',
gap: '40px',
'& > *': {
// Shift up to compensate for the the shadow on the buttons
transform: 'translateY(-2px)',
},
}}
>
{children}
</Box>
);
};

const ButtonContainer = () => {
return (
<Container>
<DepositEthButton />
<WithdrawEthButton />
</Container>
);
};

export default ButtonContainer;
10 changes: 8 additions & 2 deletions src/components/manage-funds/ManageFunds.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import ButtonContainer from "./ButtonContainer";
import DepositEthButton from "./DepositEthButton";
import WithdrawEthButton from "./WithdrawEthButton";

Expand All @@ -8,10 +9,15 @@ export function ManageFunds() {
width: 1440,
height: 1024,
outline: '1px solid red',
backgroundColor: '#FFFFFF',
}}
>
<DepositEthButton />
<WithdrawEthButton />
<ButtonContainer
children={[
<DepositEthButton />,
<WithdrawEthButton />,
]}
/>
</div>
);
}

0 comments on commit a01c994

Please sign in to comment.