Refactor: Decrease visual shortcut font size
This commit is contained in:
parent
fe49ba9e23
commit
420bf4ba4d
3 changed files with 13 additions and 13 deletions
|
|
@ -12,35 +12,35 @@ export default function RenderIcons({
|
|||
shortcutWPlus: string[];
|
||||
}): JSX.Element {
|
||||
return hasShift ? (
|
||||
<>
|
||||
<span className="flex gap-0.5 text-xs">
|
||||
{isMac ? (
|
||||
<ForwardedIconComponent name="Command" className="h-4 w-4" />
|
||||
<ForwardedIconComponent name="Command" className="h-3 w-3" />
|
||||
) : (
|
||||
filteredShortcut[0]
|
||||
)}
|
||||
<ForwardedIconComponent name="ArrowBigUp" className="ml-1 h-5 w-5" />
|
||||
<ForwardedIconComponent name="ArrowBigUp" className=" h-4 w-4" />
|
||||
{filteredShortcut.map((key, idx) => {
|
||||
if (idx > 0) {
|
||||
return <span className="ml-1"> {key.toUpperCase()} </span>;
|
||||
return <span className=""> {key.toUpperCase()} </span>;
|
||||
}
|
||||
})}
|
||||
</>
|
||||
</span>
|
||||
) : (
|
||||
<>
|
||||
<span className="flex gap-1 text-xs">
|
||||
{shortcutWPlus[0].toLowerCase() === "space" ? (
|
||||
"Space"
|
||||
) : shortcutWPlus[0].length <= 1 ? (
|
||||
shortcutWPlus[0]
|
||||
) : isMac ? (
|
||||
<ForwardedIconComponent name="Command" className="h-4 w-4" />
|
||||
<ForwardedIconComponent name="Command" className="h-3 w-3" />
|
||||
) : (
|
||||
shortcutWPlus[0]
|
||||
)}
|
||||
{shortcutWPlus.map((key, idx) => {
|
||||
if (idx > 0) {
|
||||
return <span className="ml-0.5"> {key.toUpperCase()} </span>;
|
||||
return <span className=""> {key.toUpperCase()} </span>;
|
||||
}
|
||||
})}
|
||||
</>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ export default function NodeToolbarComponent({
|
|||
<div className="flex justify-center">
|
||||
<span> {name} </span>
|
||||
<span
|
||||
className={`ml-3 flex items-center rounded-sm bg-muted px-1 py-[0.2] text-muted-foreground`}
|
||||
className={`ml-3 flex items-center rounded-sm bg-muted px-1.5 py-[0.1em] text-lg text-muted-foreground`}
|
||||
>
|
||||
<RenderIcons
|
||||
isMac={isMac}
|
||||
|
|
@ -707,7 +707,7 @@ export default function NodeToolbarComponent({
|
|||
/>{" "}
|
||||
<span className="">Delete</span>{" "}
|
||||
<span
|
||||
className={`justify absolute right-2 top-2 flex items-center rounded-sm px-1 py-[0.2] ${deleteIsFocus ? " " : "bg-muted"}`}
|
||||
className={` absolute right-2 top-2 flex items-center justify-center rounded-sm px-1 py-[0.2] ${deleteIsFocus ? " " : "bg-muted"}`}
|
||||
>
|
||||
<IconComponent
|
||||
name="Delete"
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export default function ToolbarSelectItem({
|
|||
}
|
||||
});
|
||||
const filteredShortcut = fixedShortcut.filter(
|
||||
(key) => !key.toLowerCase().includes("shift")
|
||||
(key) => !key.toLowerCase().includes("shift"),
|
||||
);
|
||||
let shortcutWPlus: string[] = [];
|
||||
if (!hasShift) shortcutWPlus = filteredShortcut.join("+").split(" ");
|
||||
|
|
@ -38,7 +38,7 @@ export default function ToolbarSelectItem({
|
|||
{value}
|
||||
</span>
|
||||
<span
|
||||
className={`absolute right-2 top-[0.43em] flex items-center rounded-sm bg-muted px-1 py-[0.2] text-muted-foreground `}
|
||||
className={`absolute right-2 top-[0.43em] flex items-center rounded-sm bg-muted px-1.5 py-[0.1em] text-muted-foreground `}
|
||||
>
|
||||
<RenderIcons
|
||||
isMac={isMac}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue