import classnames from "classnames"; import noop from "lodash/noop"; import React, { useState } from "react"; import { ActionSchema } from "../../interfaces"; import { iconClass } from "../../utils/iconClass"; import { Select } from "../select/select.component"; import { Table, TableProps } from "../table/table.component"; export type ActionsTableProps = Omit, "columns"> & { onAddAction?: (actionName: string) => void; availableActions?: { label: string; value: string }[]; }; export function ActionsTable({ disableFilters = true, disablePagination = true, availableActions = [], onAddAction = noop, ...props }: ActionsTableProps) { const { i18n = (f: string) => f } = props; const [currentAction, setAction] = useState(""); const columns = React.useMemo(() => { return [ { Header: i18n("Actions"), accessor: "title", id: "title" } ]; }, []); return (
); }