mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-08 22:59:52 +03:00
feat: bunch of new stuff + proper dependency handling
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user