Skip to content

Commit 64dbaac

Browse files
committed
code preview button added and tested
1 parent 4a323ad commit 64dbaac

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

app/src/components/main/CanvasContainer.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useDispatch, useSelector } from 'react-redux';
44
import { RootState } from '../../redux/store';
55
import CodePreview from '../bottom/CodePreview';
66
import { toggleCodePreview } from '../../redux/reducers/slice/appStateSlice';
7+
import { Button } from '@mui/material';
78

89
// The CanvasContainer sets the boundaries on the width/height of the canvas
910
function CanvasContainer(props): JSX.Element {
@@ -31,24 +32,24 @@ function CanvasContainer(props): JSX.Element {
3132
const codePreviewStyle = {
3233
position: 'absolute',
3334
width: 'max-content',
34-
minHeight: '5%',
35-
border: '1px solid #4a4a4a',
36-
top: '1vw',
35+
height: 'max-content',
36+
bottom: '100px',
3737
right: '51vw',
3838
textAlign: 'center',
39-
zIndex: 1,
39+
color: '#ffffff',
40+
backgroundColor: '#151515'
4041
} as const;
4142

4243
return (
4344
<div style={canvasContainerStyle}>
4445
{state.codePreview && <CodePreview theme={theme} setTheme={setTheme}/>}
4546
{!state.codePreview && <Canvas isThemeLight={props.isThemeLight}/>}
46-
<div
47+
<Button
4748
style={codePreviewStyle}
4849
onClick={onClickCodePreview}
4950
>
5051
Code Preview
51-
</div>
52+
</Button>
5253
</div>
5354
);
5455
}

0 commit comments

Comments
 (0)