import * as React from "react"; import { destroy } from "../api/crud"; import { t } from "../i18next_wrapper"; import { UUID } from "../resources/interfaces"; import { omit } from "lodash"; interface ButtonCustomProps { dispatch: Function; uuid: UUID; children?: React.ReactChild onDestroy?: Function; } type ButtonHtmlProps = React.ButtonHTMLAttributes; type DeleteButtonProps = ButtonCustomProps & ButtonHtmlProps; /** Unfortunately, React will trigger a runtime * warning if we pass extra props to HTML elements */ const OMIT_THESE: Record = { "dispatch": true, "uuid": true, "children": true, "onDestroy": true, }; export const DeleteButton = (props: DeleteButtonProps) => ;