📝 (nodeToolbarComponent/index.tsx): update styleObj for Share button to improve code readability and maintainability

📝 (nodeToolbarComponent/index.tsx): update styleObj for Docs button to improve code readability and maintainability
📝 (nodeToolbarComponent/index.tsx): update className for Command icon to improve code readability and maintainability
📝 (toolbarSelectItem/index.tsx): update className for Command icon to improve code readability and maintainability
This commit is contained in:
cristhianzl 2024-03-15 15:41:40 -03:00
commit 62dea63482
2 changed files with 13 additions and 11 deletions

View file

@ -495,7 +495,9 @@ export default function NodeToolbarComponent({
shift={true}
value={"Share"}
icon={"Share3"}
styleObj={{iconClasses: "relative top-0.5 -m-1 mr-1 h-6 w-6"}}
styleObj={{
iconClasses: "relative top-0.5 -m-1 mr-1 h-6 w-6",
}}
/>
</SelectItem>
)}
@ -515,12 +517,12 @@ export default function NodeToolbarComponent({
disabled={data.node?.documentation === ""}
>
<ToolbarSelectItem
keyboardKey="D"
isMac={navigator.userAgent.toUpperCase().includes("MAC")}
shift={true}
value={"Docs"}
icon={"FileText"}
/>
keyboardKey="D"
isMac={navigator.userAgent.toUpperCase().includes("MAC")}
shift={true}
value={"Docs"}
icon={"FileText"}
/>
</SelectItem>
{isMinimal && (
<SelectItem value={"show"}>
@ -533,7 +535,7 @@ export default function NodeToolbarComponent({
{navigator.userAgent.toUpperCase().includes("MAC") ? (
<IconComponent
name="Command"
className="absolute right-[1.15rem] top-[0.65em] h-3.5 w-3.5 stroke-2"
className="absolute right-[1.25rem] top-[0.65em] h-3.5 w-3.5 stroke-2"
></IconComponent>
) : (
<span className="absolute right-[1.30rem] top-[0.40em] stroke-2">

View file

@ -19,9 +19,9 @@ export default function ToolbarSelectItem({
{isMac ? (
<ForwardedIconComponent
name="Command"
className={`absolute right-[${
shift ? "2rem" : "1.15rem"
}] top-[0.65em] h-3.5 w-3.5 stroke-2 ${styleObj?.commandClasses}`}
className={`absolute
${shift ? " right-[2rem] " : "right-[1.15rem]"}
top-[0.65em] h-3.5 w-3.5 stroke-2 ${styleObj?.commandClasses}`}
></ForwardedIconComponent>
) : (
<span