File size: 1,158 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 38 39 40 41 |
import { Avatar, Grid, Typography } from '@mui/material';
import React from 'react';
import {
useAllFocusedNodeIds,
useUiTranslator,
} from '../../core/components/hooks';
import { BottomToolbarDrawer } from '../BottomToolbar';
import DeleteAll from './DeleteAll';
import DuplicateAll from './DuplicateAll';
export const MultiNodesBottomToolbar: React.FC = React.memo(() => {
const { t } = useUiTranslator();
const focusedNodeIds = useAllFocusedNodeIds();
return (
<BottomToolbarDrawer open={focusedNodeIds.length > 1} anchor={'bottom'}>
<Grid container={true} direction="row" alignItems="center">
<Grid item={true}>
<Avatar
children={focusedNodeIds.length}
style={{
marginRight: 16,
}}
/>
</Grid>
<Grid item={true}>
<Typography variant="subtitle1">
{t('(multiple selected)')}
</Typography>
</Grid>
<Grid item style={{ marginLeft: 'auto' }}>
<DuplicateAll />
</Grid>
<Grid item>
<DeleteAll />
</Grid>
</Grid>
</BottomToolbarDrawer>
);
});
|