feat: unify workspace sidebar and create Foundry graph pages

This commit is contained in:
2026-11-05 23:57:45 +08:00
parent 6ca4b00d2c
commit 71bf8b0f5e
15 changed files with 417 additions and 238 deletions
+27
View File
@@ -0,0 +1,27 @@
"use client";
import { forwardRef, type ButtonHTMLAttributes } from "react";
import type { LucideIcon } from "lucide-react";
import styles from "./icon-button.module.css";
export type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> & {
icon: LucideIcon;
label: string;
};
export const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(
function IconButton({ icon: Icon, label, className = "", type = "button", ...props }, ref) {
return (
<button
ref={ref}
type={type}
aria-label={label}
title={label}
className={`${styles.button} ${className}`}
{...props}
>
<Icon size={16} strokeWidth={1.6} aria-hidden="true" />
</button>
);
},
);