feat: library display option, navbar count

This commit is contained in:
David Ralph
2026-01-28 15:49:22 +00:00
parent 05bf8edeea
commit a4e575c5f6
10 changed files with 248 additions and 48 deletions

View File

@@ -3,7 +3,7 @@ import Tooltip from 'components/Elements/Tooltip/Tooltip';
const Button = forwardRef(
(
{ icon, label, type, iconPlacement, onClick, active, disabled, tooltipTitle, tooltipKey, href, style },
{ icon, label, type, iconPlacement, onClick, active, disabled, tooltipTitle, tooltipKey, href, style, badge },
ref,
) => {
let className;
@@ -46,16 +46,18 @@ const Button = forwardRef(
<button className={className} onClick={onClick} ref={ref} disabled={disabled} style={style}>
{icon}
{label}
{badge !== undefined && badge !== null && <span className="btn-badge">{badge}</span>}
</button>
);
const linkButton = (
<a className={className} onClick={onClick} ref={ref} disabled={disabled} href={href} style={style}
<a className={className} onClick={onClick} ref={ref} disabled={disabled} href={href} style={style}
target="_blank"
rel="noopener noreferrer"
>
{icon}
{label}
{badge && <span className="btn-badge">{badge}</span>}
</a>
);
@@ -73,6 +75,7 @@ const Button = forwardRef(
>
{icon}
{label}
{badge && <span className="btn-badge">{badge}</span>}
</a>
</Tooltip>
);