1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-26 13:48:33 +02:00

manually clear DependencyActions (#7827)

This commit is contained in:
Tymoteusz Czech 2024-08-12 12:00:46 +02:00 committed by GitHub
parent e77bb1b2e7
commit 8091987aaa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,5 @@
import type React from 'react';
import { type FC, useState } from 'react';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import {
IconButton,
ListItemIcon,
@ -71,47 +70,33 @@ export const DependencyActions: FC<{
disableScrollLock={true}
>
<MenuList aria-labelledby={id}>
<ConditionallyRender
condition={true}
show={
<MenuItem
onClick={() => {
onEdit();
closeActions();
}}
>
<ListItemIcon>
<Edit />
</ListItemIcon>
<ListItemText>
<Typography variant='body2'>
Edit
</Typography>
</ListItemText>
</MenuItem>
}
/>
<MenuItem
onClick={() => {
onEdit();
closeActions();
}}
>
<ListItemIcon>
<Edit />
</ListItemIcon>
<ListItemText>
<Typography variant='body2'>Edit</Typography>
</ListItemText>
</MenuItem>
<ConditionallyRender
condition={true}
show={
<MenuItem
onClick={() => {
onDelete();
closeActions();
}}
>
<ListItemIcon>
<Delete />
</ListItemIcon>
<ListItemText>
<Typography variant='body2'>
Delete
</Typography>
</ListItemText>
</MenuItem>
}
/>
<MenuItem
onClick={() => {
onDelete();
closeActions();
}}
>
<ListItemIcon>
<Delete />
</ListItemIcon>
<ListItemText>
<Typography variant='body2'>Delete</Typography>
</ListItemText>
</MenuItem>
</MenuList>
</StyledPopover>
</Box>