Refactor buttons (#1257)
* Refactor buttons * Complete components creation * Complete refactoring * fix lint * Complete button work
This commit is contained in:
@ -6,7 +6,7 @@ import styled from '@emotion/styled';
|
||||
import { autoUpdate, flip, offset, useFloating } from '@floating-ui/react';
|
||||
import { IconDotsVertical, IconLinkOff, IconTrash } from '@tabler/icons-react';
|
||||
|
||||
import { IconButton } from '@/ui/button/components/IconButton';
|
||||
import { FloatingIconButton } from '@/ui/button/components/FloatingIconButton';
|
||||
import { DropdownMenuSelectableItem } from '@/ui/dropdown/components/DropdownMenuSelectableItem';
|
||||
import { StyledDropdownMenu } from '@/ui/dropdown/components/StyledDropdownMenu';
|
||||
import { StyledDropdownMenuItemsContainer } from '@/ui/dropdown/components/StyledDropdownMenuItemsContainer';
|
||||
@ -165,11 +165,10 @@ export function PeopleCard({
|
||||
</StyledCardInfo>
|
||||
{isHovered && (
|
||||
<div ref={refs.setReference}>
|
||||
<IconButton
|
||||
<FloatingIconButton
|
||||
onClick={handleToggleOptions}
|
||||
variant="shadow"
|
||||
size="small"
|
||||
icon={<IconDotsVertical size={theme.icon.size.md} />}
|
||||
icon={<IconDotsVertical />}
|
||||
/>
|
||||
{isOptionsOpen && (
|
||||
<StyledDropdownMenu ref={refs.setFloating} style={floatingStyles}>
|
||||
@ -177,15 +176,11 @@ export function PeopleCard({
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<DropdownMenuSelectableItem onClick={handleDetachPerson}>
|
||||
<IconButton icon={<IconLinkOff size={14} />} size="small" />
|
||||
<IconLinkOff size={14} />
|
||||
Detach relation
|
||||
</DropdownMenuSelectableItem>
|
||||
<DropdownMenuSelectableItem onClick={handleDeletePerson}>
|
||||
<IconButton
|
||||
icon={<IconTrash size={14} />}
|
||||
size="small"
|
||||
textColor="danger"
|
||||
/>
|
||||
<IconTrash size={14} color={theme.font.color.danger} />
|
||||
<StyledRemoveOption>Delete person</StyledRemoveOption>
|
||||
</DropdownMenuSelectableItem>
|
||||
</StyledDropdownMenuItemsContainer>
|
||||
|
||||
Reference in New Issue
Block a user