Skip to content

Commit 3689ad1

Browse files
authored
Minor style polishing on the new tune menu (#126)
1 parent 18e513d commit 3689ad1

File tree

1 file changed

+10
-8
lines changed
  • packages/editor-sample/src/documents/blocks/helpers/block-wrappers

1 file changed

+10
-8
lines changed

packages/editor-sample/src/documents/blocks/helpers/block-wrappers/TuneMenu.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
import React, { CSSProperties } from 'react';
1+
import React from 'react';
22

33
import { ArrowDownwardOutlined, ArrowUpwardOutlined, DeleteOutlined } from '@mui/icons-material';
4-
import { IconButton, Paper, Stack, Tooltip } from '@mui/material';
4+
import { IconButton, Paper, Stack, SxProps, Tooltip } from '@mui/material';
55

66
import { TEditorBlock } from '../../../editor/core';
77
import { resetDocument, setSelectedBlockId, useDocument } from '../../../editor/EditorContext';
88
import { ColumnsContainerProps } from '../../ColumnsContainer/ColumnsContainerPropsSchema';
99

10-
const STYLE: CSSProperties = {
10+
const sx: SxProps = {
1111
position: 'absolute',
1212
top: 0,
13-
left: -52,
13+
left: -56,
1414
borderRadius: 64,
15-
padding: 2,
15+
paddingX: 0.5,
16+
paddingY: 1,
17+
zIndex: 'fab',
1618
};
1719

1820
type Props = {
@@ -147,14 +149,14 @@ export default function TuneMenu({ blockId }: Props) {
147149
};
148150

149151
return (
150-
<Paper style={STYLE} onClick={(ev) => ev.stopPropagation()}>
152+
<Paper sx={sx} onClick={(ev) => ev.stopPropagation()}>
151153
<Stack>
152-
<Tooltip title="Move Up" placement="left-start">
154+
<Tooltip title="Move up" placement="left-start">
153155
<IconButton onClick={() => handleMoveClick('up')} sx={{ color: 'text.primary' }}>
154156
<ArrowUpwardOutlined fontSize="small" />
155157
</IconButton>
156158
</Tooltip>
157-
<Tooltip title="Move Down" placement="left-start">
159+
<Tooltip title="Move down" placement="left-start">
158160
<IconButton onClick={() => handleMoveClick('down')} sx={{ color: 'text.primary' }}>
159161
<ArrowDownwardOutlined fontSize="small" />
160162
</IconButton>

0 commit comments

Comments
 (0)