mirror of
https://github.com/linsa-io/linsa.git
synced 2026-04-19 15:01:27 +02:00
26 lines
671 B
TypeScript
26 lines
671 B
TypeScript
import { ToolbarButton } from "../toolbar-button"
|
|
import { TrashIcon } from "@radix-ui/react-icons"
|
|
|
|
const ImagePopoverBlock = ({
|
|
onRemove,
|
|
}: {
|
|
onRemove: (e: React.MouseEvent<HTMLButtonElement>) => void
|
|
}) => {
|
|
const handleRemove = (e: React.MouseEvent<HTMLButtonElement>) => {
|
|
e.preventDefault()
|
|
onRemove(e)
|
|
}
|
|
|
|
return (
|
|
<div className="flex h-10 overflow-hidden rounded bg-background p-2 shadow-lg">
|
|
<div className="inline-flex items-center gap-1">
|
|
<ToolbarButton tooltip="Remove" onClick={handleRemove}>
|
|
<TrashIcon className="size-4" />
|
|
</ToolbarButton>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export { ImagePopoverBlock }
|