feat: bunch of new stuff + proper dependency handling

This commit is contained in:
zkldi
2022-11-25 03:46:11 +00:00
parent cbce1a31f4
commit a6d89f748e
28 changed files with 567 additions and 232 deletions
+8 -1
View File
@@ -8,14 +8,21 @@ export default function LinkButton({
children,
style,
onClick,
disabled = false,
}: {
to: string;
className?: string;
style?: CSSProperties;
onClick?: () => void;
disabled?: boolean;
} & JustChildren) {
return (
<Link onClick={onClick} to={to} className={`btn ${className}`} style={style}>
<Link
onClick={onClick}
to={to}
className={`btn ${disabled ? "disabled" : ""} ${className}`}
style={style}
>
{children}
</Link>
);
@@ -10,14 +10,17 @@ export default function SelectLinkButton({
offVariant = "outline-secondary",
to,
matchIfStartsWith = false,
disabled = false,
}: {
onVariant?: ButtonVariant;
offVariant?: ButtonVariant;
to: string;
matchIfStartsWith?: boolean;
disabled?: boolean;
} & JustChildren) {
return (
<LinkButton
disabled={disabled}
to={to}
className={`btn-${
DoesMatchRoute(window.location.href, to, !matchIfStartsWith)