feat: fixes UX around drag and drop onto canvas

This commit is contained in:
Mark Mankarious
2023-11-09 00:10:35 +00:00
parent c9c86e5608
commit 37bc36c563
2 changed files with 8 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
import React, { useCallback } from 'react';
import { Stack, Alert } from '@mui/material';
import { ControlsContainer } from 'src/components/ItemControls/components/ControlsContainer';
import { useUiStateStore } from 'src/stores/uiStateStore';
import { Icon } from 'src/types';
@@ -36,7 +37,12 @@ export const IconSelectionControls = () => {
<ControlsContainer
header={
<Section sx={{ position: 'sticky', top: 0, pt: 6, pb: 3 }}>
<Searchbox value={filter} onChange={setFilter} />
<Stack spacing={2}>
<Searchbox value={filter} onChange={setFilter} />
<Alert severity="info">
You can drag and drop icons below onto the canvas.
</Alert>
</Stack>
</Section>
}
>

View File

@@ -98,8 +98,7 @@ export const UiOverlay = () => {
width: 0,
height: 0,
top: 0,
left: 0,
zIndex: 1
left: 0
}}
>
{availableTools.includes('ITEM_CONTROLS') && itemControls && (