@excalidraw/excalidraw
Version:
Excalidraw as a React component
36 lines (35 loc) • 976 B
TypeScript
import "./ToolIcon.scss";
import React from "react";
export declare type ToolButtonSize = "small" | "medium";
declare type ToolButtonBaseProps = {
icon?: React.ReactNode;
"aria-label": string;
"aria-keyshortcuts"?: string;
"data-testid"?: string;
label?: string;
title?: string;
name?: string;
id?: string;
size?: ToolButtonSize;
keyBindingLabel?: string;
showAriaLabel?: boolean;
hidden?: boolean;
visible?: boolean;
selected?: boolean;
className?: string;
};
declare type ToolButtonProps = (ToolButtonBaseProps & {
type: "button";
children?: React.ReactNode;
onClick?(): void;
}) | (ToolButtonBaseProps & {
type: "icon";
children?: React.ReactNode;
onClick?(): void;
}) | (ToolButtonBaseProps & {
type: "radio";
checked: boolean;
onChange?(): void;
});
export declare const ToolButton: React.ForwardRefExoticComponent<ToolButtonProps & React.RefAttributes<unknown>>;
export {};