import { CellContext } from "@tanstack/react-table"; import cx from "clsx"; import { HTMLAttributes } from "react"; import { type CellMetadata, Operation } from "../../../interfaces"; import type { JSONRecord } from "../../../interfaces/JSONRecord.js"; import { registerComponent } from "../../../registries/components"; import { iconClass } from "../../../utils/iconClass"; import { stopPropagationWrapper } from "../../../utils/stopPropagationWrapper"; export interface OperationButtonProps extends Omit, "onClick"> { operation: Operation; info: CellContext; metadata?: CellMetadata; onClick: () => void; i18n?: (i18n: string) => string; } export function DefaultOperationButton(props: OperationButtonProps) { // eslint-disable-next-line @typescript-eslint/no-unused-vars const { i18n = (f: string) => f, onClick, operation, info, ...extraProps } = props; const { className = "btn", buttonSize = "xs", buttonType = "primary", buttonOutline, action, title = "", icon = "" } = operation; return ( ); } registerComponent("OperationButton", DefaultOperationButton);