import "./ToolIcon.scss"; import React from "react"; import { getShortcutKey } from "../utils"; type LockIconSize = "s" | "m"; type LockIconProps = { title?: string; name?: string; id?: string; checked: boolean; onChange?(): void; size?: LockIconSize; isButton?: boolean; }; const DEFAULT_SIZE: LockIconSize = "m"; const ICONS = { CHECKED: ( ), UNCHECKED: ( ), }; export function LockIcon(props: LockIconProps) { const sizeCn = `ToolIcon_size_${props.size || DEFAULT_SIZE}`; return ( {props.checked ? ICONS.CHECKED : ICONS.UNCHECKED} ); }