mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-08 17:51:20 +02:00
cleanup
This commit is contained in:
parent
90451f7172
commit
6d0de6f947
@ -57,38 +57,20 @@ const QuickAccessBar = forwardRef<HTMLDivElement>(({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Render with URL navigation if available, otherwise regular div
|
// Render navigation button with conditional URL support
|
||||||
if (navProps) {
|
|
||||||
return (
|
|
||||||
<div key={config.id} className="flex flex-col items-center gap-1" style={{ marginTop: index === 0 ? '0.5rem' : "0rem" }}>
|
|
||||||
<ActionIcon
|
|
||||||
component="a"
|
|
||||||
href={navProps.href}
|
|
||||||
onClick={(e: React.MouseEvent) => handleClick(e)}
|
|
||||||
size={isActive ? (config.size || 'lg') : 'lg'}
|
|
||||||
variant="subtle"
|
|
||||||
aria-label={config.name}
|
|
||||||
style={getNavButtonStyle(config, activeButton, isFilesModalOpen, configModalOpen, selectedToolKey, leftPanelView)}
|
|
||||||
className={isActive ? 'activeIconScale' : ''}
|
|
||||||
data-testid={`${config.id}-button`}
|
|
||||||
>
|
|
||||||
<span className="iconContainer">
|
|
||||||
{config.icon}
|
|
||||||
</span>
|
|
||||||
</ActionIcon>
|
|
||||||
<span className={`button-text ${isActive ? 'active' : 'inactive'}`}>
|
|
||||||
{config.name}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div key={config.id} className="flex flex-col items-center gap-1" style={{ marginTop: index === 0 ? '0.5rem' : "0rem" }}>
|
<div key={config.id} className="flex flex-col items-center gap-1" style={{ marginTop: index === 0 ? '0.5rem' : "0rem" }}>
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
|
{...(navProps ? {
|
||||||
|
component: "a" as const,
|
||||||
|
href: navProps.href,
|
||||||
|
onClick: (e: React.MouseEvent) => handleClick(e),
|
||||||
|
'aria-label': config.name
|
||||||
|
} : {
|
||||||
|
onClick: () => handleClick()
|
||||||
|
})}
|
||||||
size={isActive ? (config.size || 'lg') : 'lg'}
|
size={isActive ? (config.size || 'lg') : 'lg'}
|
||||||
variant="subtle"
|
variant="subtle"
|
||||||
onClick={() => handleClick()}
|
|
||||||
style={getNavButtonStyle(config, activeButton, isFilesModalOpen, configModalOpen, selectedToolKey, leftPanelView)}
|
style={getNavButtonStyle(config, activeButton, isFilesModalOpen, configModalOpen, selectedToolKey, leftPanelView)}
|
||||||
className={isActive ? 'activeIconScale' : ''}
|
className={isActive ? 'activeIconScale' : ''}
|
||||||
data-testid={`${config.id}-button`}
|
data-testid={`${config.id}-button`}
|
||||||
|
Loading…
Reference in New Issue
Block a user