2024-08-20 00:49:40 +02:00
|
|
|
// Copyright 2024, Command Line Inc.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
import { clsx } from "clsx";
|
|
|
|
import * as React from "react";
|
|
|
|
|
2024-11-22 01:05:04 +01:00
|
|
|
import "./linkbutton.scss";
|
2024-08-20 00:49:40 +02:00
|
|
|
|
|
|
|
interface LinkButtonProps {
|
|
|
|
href: string;
|
|
|
|
rel?: string;
|
|
|
|
target?: string;
|
|
|
|
children: React.ReactNode;
|
|
|
|
disabled?: boolean;
|
|
|
|
style?: React.CSSProperties;
|
|
|
|
autoFocus?: boolean;
|
|
|
|
className?: string;
|
|
|
|
termInline?: boolean;
|
|
|
|
title?: string;
|
|
|
|
onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
|
|
}
|
|
|
|
|
2024-11-16 06:26:48 +01:00
|
|
|
const LinkButton = ({ children, className, ...rest }: LinkButtonProps) => {
|
2024-08-20 00:49:40 +02:00
|
|
|
return (
|
2024-09-19 19:43:32 +02:00
|
|
|
<a {...rest} className={clsx("button grey solid link-button", className)}>
|
2024-11-16 06:26:48 +01:00
|
|
|
<span className="button-inner">{children}</span>
|
2024-08-20 00:49:40 +02:00
|
|
|
</a>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export { LinkButton };
|