import * as React from "react"; import { Button, type ButtonProps } from "@/components/ui/button"; export interface IconButtonProps extends Omit { /** What the button does. Becomes the accessible name and the tooltip. */ label: string; /** The icon. It gets w-4 in icon-sm and w-5 in icon-lg unless it sets its own size. */ children: React.ReactNode; } /** * An icon-only button (R1): ghost, 32px (`icon-sm`) unless told otherwise, * always named. `title` defaults to the label; pass `title=""` to drop the * tooltip where another one already shows. */ const IconButton = React.forwardRef( ({ label, variant = "ghost", size = "icon-sm", type = "button", title, children, ...props }, ref) => ( ) ); IconButton.displayName = "IconButton"; export { IconButton };