Files
upstream-excalidraw/packages/excalidraw/components/LaserPointerButton.tsx
2026-09-16 05:31:04 +05:00

30 lines
700 B
TypeScript

import clsx from "clsx";
import { IconButton } from "./IconButton";
import { laserPointerToolIcon } from "./icons";
type LaserPointerButtonProps = {
title?: string;
checked: boolean;
onChange?(): void;
isMobile?: boolean;
};
export const LaserPointerButton = (props: LaserPointerButtonProps) => {
return (
<IconButton
className={clsx("ToolIcon__LaserPointer", {
"is-mobile": props.isMobile,
})}
type="toggle"
size="small"
icon={laserPointerToolIcon}
checked={props.checked}
title={`${props.title}`}
aria-label={`${props.title}`}
data-testid="toolbar-LaserPointer"
onSelect={() => props.onChange?.()}
/>
);
};