import type {useSortable} from '@dnd-kit/sortable'; import styled from '@emotion/styled'; import {Button} from 'sentry/components/button'; import {IconCopy, IconDelete, IconEdit, IconGrabbable} from 'sentry/icons'; import {t} from 'sentry/locale'; import {space} from 'sentry/styles/space'; import {DRAG_HANDLE_CLASS} from '../dashboard'; type DraggableProps = Pick, 'attributes' | 'listeners'>; type ToolbarProps = { draggableProps?: DraggableProps; hideToolbar?: boolean; isMobile?: boolean; onDelete?: () => void; onDuplicate?: () => void; onEdit?: () => void; }; export function Toolbar({ hideToolbar, isMobile, onEdit, onDelete, onDuplicate, draggableProps, }: ToolbarProps) { return ( {!isMobile && ( } borderless className={DRAG_HANDLE_CLASS} {...draggableProps?.listeners} {...draggableProps?.attributes} /> )} {onEdit && (