import "./ToolIcon.scss"; import React from "react"; type ToolIconSize = "s" | "m"; type ToolIconProps = | { type: "button"; icon: React.ReactNode; "aria-label": string; title?: string; name?: string; id?: string; onClick?(): void; size?: ToolIconSize; } | { type: "radio"; icon: React.ReactNode; title?: string; name?: string; id?: string; checked: boolean; onChange?(): void; size?: ToolIconSize; }; const DEFAULT_SIZE: ToolIconSize = "m"; export function ToolIcon(props: ToolIconProps) { const sizeCn = `ToolIcon_size_${props.size || DEFAULT_SIZE}`; if (props.type === "button") return ( ); return ( ); }