waveterm/frontend/app/element/linkbutton.tsx

32 lines
783 B
TypeScript
Raw Normal View History

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";
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 (
<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 };