waveterm/frontend/app/element/linkbutton.tsx

32 lines
779 B
TypeScript
Raw Normal View History

// Copyright 2025, Command Line Inc.
2024-08-19 22:49:40 +00:00
// SPDX-License-Identifier: Apache-2.0
import clsx from "clsx";
2024-08-19 22:49:40 +00:00
import * as React from "react";
import "./linkbutton.scss";
2024-08-19 22:49:40 +00: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 05:26:48 +00:00
const LinkButton = ({ children, className, ...rest }: LinkButtonProps) => {
2024-08-19 22:49:40 +00:00
return (
<a {...rest} className={clsx("button grey solid link-button", className)}>
2024-11-16 05:26:48 +00:00
<span className="button-inner">{children}</span>
2024-08-19 22:49:40 +00:00
</a>
);
};
export { LinkButton };