|
1 | | -import React, { CSSProperties } from 'react'; |
| 1 | +import React from 'react'; |
2 | 2 |
|
3 | 3 | 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'; |
5 | 5 |
|
6 | 6 | import { TEditorBlock } from '../../../editor/core'; |
7 | 7 | import { resetDocument, setSelectedBlockId, useDocument } from '../../../editor/EditorContext'; |
8 | 8 | import { ColumnsContainerProps } from '../../ColumnsContainer/ColumnsContainerPropsSchema'; |
9 | 9 |
|
10 | | -const STYLE: CSSProperties = { |
| 10 | +const sx: SxProps = { |
11 | 11 | position: 'absolute', |
12 | 12 | top: 0, |
13 | | - left: -52, |
| 13 | + left: -56, |
14 | 14 | borderRadius: 64, |
15 | | - padding: 2, |
| 15 | + paddingX: 0.5, |
| 16 | + paddingY: 1, |
| 17 | + zIndex: 'fab', |
16 | 18 | }; |
17 | 19 |
|
18 | 20 | type Props = { |
@@ -147,14 +149,14 @@ export default function TuneMenu({ blockId }: Props) { |
147 | 149 | }; |
148 | 150 |
|
149 | 151 | return ( |
150 | | - <Paper style={STYLE} onClick={(ev) => ev.stopPropagation()}> |
| 152 | + <Paper sx={sx} onClick={(ev) => ev.stopPropagation()}> |
151 | 153 | <Stack> |
152 | | - <Tooltip title="Move Up" placement="left-start"> |
| 154 | + <Tooltip title="Move up" placement="left-start"> |
153 | 155 | <IconButton onClick={() => handleMoveClick('up')} sx={{ color: 'text.primary' }}> |
154 | 156 | <ArrowUpwardOutlined fontSize="small" /> |
155 | 157 | </IconButton> |
156 | 158 | </Tooltip> |
157 | | - <Tooltip title="Move Down" placement="left-start"> |
| 159 | + <Tooltip title="Move down" placement="left-start"> |
158 | 160 | <IconButton onClick={() => handleMoveClick('down')} sx={{ color: 'text.primary' }}> |
159 | 161 | <ArrowDownwardOutlined fontSize="small" /> |
160 | 162 | </IconButton> |
|
0 commit comments