Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

moved the rename / delete menu up to prevent the delete from being hidden #10934

Merged
merged 4 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions packages/client-core/src/admin/components/scene/SceneItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,18 @@ import { twMerge } from 'tailwind-merge'
type SceneItemProps = {
scene: StaticResourceType
updateEditorState?: boolean
moveMenuUp?: boolean
handleOpenScene: () => void
refetchProjectsData: () => void
}

export const SceneItem = ({ scene, updateEditorState, handleOpenScene, refetchProjectsData }: SceneItemProps) => {
export const SceneItem = ({
scene,
updateEditorState,
moveMenuUp,
handleOpenScene,
refetchProjectsData
}: SceneItemProps) => {
const { t } = useTranslation()
const editorState = useMutableState(EditorState)

Expand Down Expand Up @@ -118,7 +125,8 @@ export const SceneItem = ({ scene, updateEditorState, handleOpenScene, refetchPr
<ul
className={twMerge(
'fixed z-10 block w-max translate-x-5 rounded-lg bg-theme-primary px-4 py-3 pr-10',
showContentMenu.value ? 'visible' : 'hidden'
showContentMenu.value ? 'visible' : 'hidden',
moveMenuUp ? '-translate-y-10' : ''
)}
style={{
top: menuPosition.top.value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export default function ScenesPanel() {
key={scene.id}
scene={scene}
updateEditorState
moveMenuUp={true}
handleOpenScene={() => onClickScene(scene)}
refetchProjectsData={scenesQuery.refetch}
/>
Expand Down
Loading