mirror of
https://github.com/zadam/trilium.git
synced 2025-12-31 11:44:23 +01:00
17 lines
427 B
TypeScript
17 lines
427 B
TypeScript
import clsx from "clsx";
|
|
import { HTMLAttributes } from "preact";
|
|
|
|
interface IconProps extends Pick<HTMLAttributes<HTMLSpanElement>, "className" | "onClick"> {
|
|
icon?: string;
|
|
className?: string;
|
|
}
|
|
|
|
export default function Icon({ icon, className, ...restProps }: IconProps) {
|
|
return (
|
|
<span
|
|
class={clsx(icon ?? "bx bx-empty", className, "tn-icon")}
|
|
{...restProps}
|
|
/>
|
|
);
|
|
}
|