File size: 1,204 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
import { IconButton, Tooltip } from '@mui/material';
import Delete from '@mui/icons-material/Delete';
import React from 'react';
import { useRemoveCell, useUiTranslator } from '../../core/components/hooks';
import DraftSwitch from '../DraftSwitch';
import { DuplicateButton } from '../DuplicateButton';
import { I18nTools } from '../I18nTools';
import { SelectParentButton } from '../SelectParentButton';
import { BottomToolbarToolsProps } from './types';
export { BottomToolbarToolsProps };
export const BottomToolbarTools: React.FC<BottomToolbarToolsProps> = React.memo(
({ nodeId }) => {
const { t } = useUiTranslator();
const removeCell = useRemoveCell(nodeId);
return (
<div style={{ display: 'flex', alignItems: 'center' }}>
<I18nTools nodeId={nodeId} />
<DraftSwitch nodeId={nodeId} />
<SelectParentButton nodeId={nodeId} />
<DuplicateButton nodeId={nodeId} />
<Tooltip title={t('Remove Plugin') ?? ''}>
<IconButton
onClick={() => removeCell()}
aria-label="delete"
color="secondary"
>
<Delete />
</IconButton>
</Tooltip>
</div>
);
}
);
|