📝 (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} shift={true}
value={"Share"} value={"Share"}
icon={"Share3"} 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> </SelectItem>
)} )}
@ -533,7 +535,7 @@ export default function NodeToolbarComponent({
{navigator.userAgent.toUpperCase().includes("MAC") ? ( {navigator.userAgent.toUpperCase().includes("MAC") ? (
<IconComponent <IconComponent
name="Command" 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> ></IconComponent>
) : ( ) : (
<span className="absolute right-[1.30rem] top-[0.40em] stroke-2"> <span className="absolute right-[1.30rem] top-[0.40em] stroke-2">

View file

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