minor-fix: console errors (#8782)
This commit is contained in:
@ -1,13 +1,10 @@
|
|||||||
import { FavoriteFolderHotkeyScope } from '@/favorites/constants/FavoriteFolderRightIconDropdownHotkeyScope';
|
import { FavoriteFolderHotkeyScope } from '@/favorites/constants/FavoriteFolderRightIconDropdownHotkeyScope';
|
||||||
import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';
|
import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';
|
||||||
import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';
|
import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';
|
||||||
import {
|
import { useTheme } from '@emotion/react';
|
||||||
IconDotsVertical,
|
import styled from '@emotion/styled';
|
||||||
IconPencil,
|
|
||||||
IconTrash,
|
import { IconDotsVertical, IconPencil, IconTrash, MenuItem } from 'twenty-ui';
|
||||||
LightIconButton,
|
|
||||||
MenuItem,
|
|
||||||
} from 'twenty-ui';
|
|
||||||
|
|
||||||
type FavoriteFolderNavigationDrawerItemDropdownProps = {
|
type FavoriteFolderNavigationDrawerItemDropdownProps = {
|
||||||
folderId: string;
|
folderId: string;
|
||||||
@ -16,12 +13,24 @@ type FavoriteFolderNavigationDrawerItemDropdownProps = {
|
|||||||
closeDropdown: () => void;
|
closeDropdown: () => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const StyledIconContainer = styled.div`
|
||||||
|
align-items: center;
|
||||||
|
background: transparent;
|
||||||
|
height: 24px;
|
||||||
|
width: 24px;
|
||||||
|
justify-content: center;
|
||||||
|
transition: background 0.1s ease;
|
||||||
|
display: flex;
|
||||||
|
`;
|
||||||
|
|
||||||
export const FavoriteFolderNavigationDrawerItemDropdown = ({
|
export const FavoriteFolderNavigationDrawerItemDropdown = ({
|
||||||
folderId,
|
folderId,
|
||||||
onRename,
|
onRename,
|
||||||
onDelete,
|
onDelete,
|
||||||
closeDropdown,
|
closeDropdown,
|
||||||
}: FavoriteFolderNavigationDrawerItemDropdownProps) => {
|
}: FavoriteFolderNavigationDrawerItemDropdownProps) => {
|
||||||
|
const theme = useTheme();
|
||||||
|
|
||||||
const handleRename = () => {
|
const handleRename = () => {
|
||||||
onRename();
|
onRename();
|
||||||
closeDropdown();
|
closeDropdown();
|
||||||
@ -41,7 +50,12 @@ export const FavoriteFolderNavigationDrawerItemDropdown = ({
|
|||||||
usePortal
|
usePortal
|
||||||
data-select-disable
|
data-select-disable
|
||||||
clickableComponent={
|
clickableComponent={
|
||||||
<LightIconButton Icon={IconDotsVertical} accent="tertiary" />
|
<StyledIconContainer>
|
||||||
|
<IconDotsVertical
|
||||||
|
size={theme.icon.size.sm}
|
||||||
|
color={theme.font.color.tertiary}
|
||||||
|
/>
|
||||||
|
</StyledIconContainer>
|
||||||
}
|
}
|
||||||
dropdownPlacement="right"
|
dropdownPlacement="right"
|
||||||
dropdownOffset={{ y: -15 }}
|
dropdownOffset={{ y: -15 }}
|
||||||
|
|||||||
Reference in New Issue
Block a user