mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Add and use clsx (classnames alternative) (#2249)
Co-authored-by: David Luzar <luzar.david@gmail.com>
This commit is contained in:
parent
1484c5a63b
commit
b50c54f855
18 changed files with 108 additions and 72 deletions
|
@ -1,6 +1,7 @@
|
|||
import "./ToolIcon.scss";
|
||||
|
||||
import React from "react";
|
||||
import clsx from "clsx";
|
||||
|
||||
type LockIconSize = "s" | "m";
|
||||
|
||||
|
@ -41,13 +42,15 @@ const ICONS = {
|
|||
};
|
||||
|
||||
export const LockIcon = (props: LockIconProps) => {
|
||||
const sizeCn = `ToolIcon_size_${props.size || DEFAULT_SIZE}`;
|
||||
|
||||
return (
|
||||
<label
|
||||
className={`ToolIcon ToolIcon__lock ToolIcon_type_floating ${sizeCn} zen-mode-visibility ${
|
||||
props.zenModeEnabled ? "zen-mode-visibility--hidden" : ""
|
||||
}`}
|
||||
className={clsx(
|
||||
"ToolIcon ToolIcon__lock ToolIcon_type_floating zen-mode-visibility",
|
||||
`ToolIcon_size_${props.size || DEFAULT_SIZE}`,
|
||||
{
|
||||
"zen-mode-visibility--hidden": props.zenModeEnabled,
|
||||
},
|
||||
)}
|
||||
title={`${props.title} — Q`}
|
||||
>
|
||||
<input
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue